Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Precision of DateTime fields
Message
De
22/02/1997 12:58:11
 
 
À
22/02/1997 09:13:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00021441
Message ID:
00021652
Vues:
32
>>Since the time is stored on 4 bytes in a datetime field, the precision is about 0.00002 seconds (better than 1/1000th). The problem is that there's no built-in FoxPro function to extract the time from a datetime field.
>>So, you probably need to write one of your own.
>
>tdTime=DATETIME()
>PADL(ALLTRIM(STR(HOUR(tdTime))),2,'0')+':'+;
> PADL(ALLTRIM(STR(MINUTE(tdTime))),2,'0')+':'+;
> PADL(ALLTRIM(STR(SEC(tdTime))),2,'0')

This way youl have the time in HH:MM:SS format. Jacques Mainguy was asking how he can have the time with a precision of 1/1000th.

There's no buil-in FoxPro function to get the real time value stored in a datetime field :(

Vlad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform