Digisapien
Member
Anyone got any code ideas for clock 24 hour to 12 hour conversion?
""" that's exactly what my best friend said do. He's a programmer """". But I don't think mod is a built in lcd commandAssuming the 24 and 12 hour times are in decimal ...
t12 = t24 Mod 12
If t12 = 0 Then : t12 = 12 : End If
Hello,Is that the actual code. Forgive me. It could just be a syntax example. There variable for time is (0). I'd like to see it expanded
#picaxe 18m2
#terminal 4800
symbol t12 = b3
symbol t24 = b4
t24 = 23 ' 11PM / change this number for different 24 hour times to convert
t12 = t24 // 12
if t12 = 0 then : t12 = 12 : end if
sertxd("Original t24 hour variable = ")
sertxd(#t24,13,10)
sertxd("Converted t12 hour variable = ")
sertxd(#t12,13,10)
end
See page 23 in PICAXE manual 2Thanks you. If you never told me that % = mod I never would have known
If you are operating the AXE033 in serial mode, then irrespective of the PICAXE chip used, you cannot alter the format that the time and date are presented.In serial mode. You answered question