Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simplify Converting Format of Character Time
Message
De
31/01/2008 16:12:17
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
31/01/2008 13:12:24
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01287573
Message ID:
01287696
Vues:
13
>This works but something bothers me about using the RIGHT(RIGHT and I think there must be a simplier way.
>
>
>S_ToT = "1515"
>
>m.Result = Ttoc(Ctot(Transform(Dtos(Date()), '@R 9999-99-99') + 'T' + LEFT(RIGHT(STR(S_ToT),4),2) + ':' + RIGHT(RIGHT(STR(S_ToT),4),2)), 2)
>
>m.Result = "03:15:00 PM"
>
Assuming you've already split the value into hours and minutes (0-23, 0-59), here goes:
*-- don't forget to restore these to normal values later.
set hours to 12
set seconds off
m.result=ttoc(datetime(2000,1,1,nHours, nMinutes, 0),2)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform