Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I extract the DATETIME from a COleDateTime
Message
From
29/01/2001 19:45:26
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
How do I extract the DATETIME from a COleDateTime
Miscellaneous
Thread ID:
00470010
Message ID:
00470010
Views:
73
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
Next
Reply
Map
View

Click here to load this message in the networking platform