Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Time format
Message
De
23/02/2009 09:26:12
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
23/02/2009 02:20:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01383407
Message ID:
01383464
Vues:
36
>>> It still returns the time as 14:52..
>
>Are you using the TIME() functions? that can't return 12 hour format, from the help file:
>
>
>"Use SET HOURS TO without 12 or 24 to return to the default 12-hour format.
>
>TIME( ) always returns a value in 24-hour format and isn't affected by SET HOURS. The value returned by DATETIME( ) is determined by the current SET HOURS setting.
>
>SET HOURS is scoped to the current data session."
>
>
>SET HOURS effect the display of time in fields.
>
>you could use DATETIME() to get the time only, like this:
>
>SET HOURS TO 12
>lcTime=RIGHT(TTOC(DATETIME()),11)
>?lcTime
>
Actually, with passing the additional parameter to ttoc() and changing the settings, you get different outputs:
?TTOC(DATETIME(),2)
* 09:23:58
SET SECONDS OFF
?TTOC(DATETIME(),2)
* 09:24
SET HOURS TO 12
?TTOC(DATETIME(),2)
* 09:24 AM
BTW, I think Evelyn's customers are too americanized...

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