-
Clock zero question?
After I convert 2400 time into hour and minute counters, is there a simple way to keep the zeros?
example:
1305 - mid$ into two counters
counter hour: 13, to text string stays 13
counter minute: 05, to text string becomes 5
added together in a text string becomes 13:5 or 1:5 P.M.
If a solution is merely an object, is it java compatible?
I can do a work around by comparing the text len against 2, but I'm hoping there's a straight forward solution.
thanks
-
Re: Clock zero question?
You might try something like this:
("counter minute")< 10
Set alterable string to: "0"+Str$value("counter minute")
("counter minute")>= 10
Set alterable string to: Str$value("counter minute")
-
Re: Clock zero question?
Can't you just force the counter to two digits in the properties?
-
Re: Clock zero question?
lost_child, I'll try it - I remember seeing something posted that was similar, but the equation was all in the change string, but now I can't find it.
LB, yes it works as a counter, but when you set the counter into a string, the zero is dropped.
Can anybody remember the post(s) which addressed this?
-
Re: Clock zero question?
I have an idea:
Left$("00", 2-Len("NUMBER HERE"))+"NUMBER HERE" should give it the correct number of zeros ;)
-
Re: Clock zero question?
Thanks LB, that's the one :)
Last night searching my computer, I finally found this one from that post I can't find.
Left$("0",2-Len(Str$(value("Minutes"))))+Str$(value("Minutes") )+":"+Left$("0",2-Len(Str$(value("Seconds"))))+Str$(value("Seconds") )
Thanks for the help