Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I extract the DATETIME from a COleDateTime
Message
De
29/01/2001 19:45:26
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
How do I extract the DATETIME from a COleDateTime
Divers
Thread ID:
00470010
Message ID:
00470010
Vues:
70
When communicating with a C++ COM server it returns the datetime as a cOleDateTime number eg:
36921.4494675926

The MSDN help says that this is in the format as :
30 DEC 1899, Midnight = 0.00
1 Jan 1900, midnight = 2.00

"Where the DATE type is implemented using an 8 byte floating point number. Days are represented by whole number increments starting with 30 Dec 1899, midnight as time zero. Hour values are expressed as the absolute value of the fractional part of the number."

So the number 36921.4494675976 translates roughly to 30 Jan 2001, 10:30 hours.

My question is if such a number is received from the COM how do I convert it to a VFP DATETIME()?

Any help will be greatly appreciated. Thanks.

Bernard
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform