Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Military Time
Message
From
01/08/2007 21:45:05
 
 
To
01/08/2007 16:26:25
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01245247
Message ID:
01245349
Views:
32
>>>How can I convert the following to non-military time? And yes, before the jokes start, the "13:45" is a value in an array. I can't just retype it to "1:45" instead. Thanks!
>>>
>>>
>>>(RIGHT( "0" + ALLTRIM( "13:45" ), 5 ))
>>>
>>
>>Hilmar and Naomi gave you the correct answer, but if you just need a quick and dirty solution and your system is set to 12 hour time you can do this:
>>
>>RIGHT(TTOC(CTOT("13:45")),11)
>>
>>It gets 00:00 correctly but not 24:00
>
>
>Nope... see reply to Naomi.

You mean about Military Time not having colons?

Doesn't seem relevant, since the source data in Jay's sample had the colon in it, providing a solution that was for data without colons would not be very helpful.

BTW from what I can see although 2400 is in common use casually the correct military notation for it is 0000.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform