Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get hour value return in 12 hour format ?
Message
De
22/04/1999 08:33:53
 
 
À
22/04/1999 03:31:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00210588
Message ID:
00210948
Vues:
30
>Try substr(ttoc(datetime()), 12,2) or something similar
>
>>I want to get the value of hour from the system time, but i want the return value in the 12 hour fromat.
>>As i know the hour(datetime()) or hour(time()) also return the 24 hour format even though use set hours to 12 .
>>Any one know how to get it , thanks
>>

There's a funny effect of SET DATE - if you SET DATE SHORT or SET DATE LONG, the time comes back 12 hour format with AM/PM using TTOC(,2). It scoped to the current datasession, and adheres to the Windows date setting for format.

>>regard,
>>chang
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform