Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DateTime variables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00439117
Message ID:
00439132
Vues:
15
>What is the correct syntax for extracting the hours and minutes from a datetime variable?
>Thanks.
I think DATETIME() converts values to update a DATETIME field type:
? VARTYPE(DATETIME(2000,11,7,23,18,30)) && returns a "T" data type
DTOC(DATETIME()) && returns a string date "11/18/2000"
TTOC(DATETIME()) && returns a string date and time
_CLIPTEXT=TTOC(DATETIME())
.. returns a character data type
11/07/2000 11:46:27 PM
so ..
cHour=SUBSTR(TTOC(DATETIME()),12,2)
cMinutes=SUBSTR(TTOC(DATETIME()),15,2)
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform