Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extracting the Date & Time from a DATETIME field
Message
De
25/02/2006 06:39:04
 
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:
01099160
Vues:
27
Sorry, I remembered wrong. However, you can use the TTOC function to get the time portion.
Date=TTOD(datetime)
Date=TTOC(datetime,2)
>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