Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Military Time
Message
De
03/08/2007 07:42:45
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
03/08/2007 06:58:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01245247
Message ID:
01245739
Vues:
27
>>>>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 ))
>>>>
>>>
>>>If you like a complicated way, assuming you have set hours 12 (although it works for me with set hours 24 contrary of what the help says, or I am reading too fast)
>>>
>>>
>>>lcTime = '13:45'
>>>? Ttoc(Ctot(Transform(Dtos(Date()), '@R 9999-99-99') + 'T' + lcTime), 2)
>>>
>>
>>Hi Hugo,
>>
>>Your solution is the closest so far, it returns correct results for quasi military time with a ":". However, it doest work with real military time.
>What is REAL military time?

Real military time has no ":" as a separator; its "1500 hours" rather than 15:00, etc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform