Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extracting the Date & Time from a DATETIME field
Message
 
À
24/02/2006 08:37:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01098831
Message ID:
01099158
Vues:
22
Tore, TIME() always gives the current, whether it has a paremeter in it or not, and the parameter should be a numeric value.
You cannot extract the time portion of any datetime vartiables using TIME(), you have to substring it.

>>Can anybody tell how I can extract the date and time from a datetime field. For example I have a record which in the created field states: 17/02/2006 09:57:42 AM.
>>
>>I would like to store 17/02/2006 to a variable and 09:57:42 to another variable
>>
>>Any help would greatly appreciated
>Date=TTOD(datetime)
>Time=TIME(datetime)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform