DateTime is (educated guess) is using Excel's Dublin Julian
format.
See
f3cK9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8X3g2F1i4K6u0W2N6$3W2C8K9i4m8W2k6r3W2S2i4K6u0W2L8%4u0Y4i4K6u0r3N6$3W2C8K9g2)9J5c8V1A6#2L8r3W2S2L8W2)9#2k6X3c8S2P5g2)9#2k6X3&6#2L8h3u0W2M7R3`.`.
and search for "Dublin" on web page
Whole numbers are the number of days.
Fractional numbers are the time out of a 24 hour day.
0.0 is 30/Dec/1899
1.0 is 31/Dec/1899
2.0 is 1/Jan/1900
3.0 is 2/Jan/1900
4.0 is 3/Jan/1900
and so on
0.0 is 00:00:00 on 24 hour clock
0.5 is 12:00:00 on 24 hour clock
0.25 is 06:00:00 on 24 hour clock
0.75 is 18:00:00 on 24 hour clock
0.10 is 02.24:00 on 24 hour clock
and so on.
我随便说的,哈哈
网上搜了下(关键词:"adDate" ado c++),有跟你需求相反的,可以参考下:
来自 510K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6h3c8S2N6r3q4T1j5i4y4W2k6X3!0J5N6h3#2Q4x3X3g2A6L8X3k6G2i4K6u0r3x3W2)9J5c8U0t1J5i4K6u0r3y4e0u0T1x3h3x3J5j5K6x3^5z5r3j5^5x3X3x3^5x3q4)9J5k6h3S2@1L8h3H3`. :
Visual Studio C++ >> How to use a unix timestamp for an adDate ADO Parameter in c++ without COleDateTime
Just thought I'd share this because it has been bugging me for
hours...
When you're calling a SQL Server stored procedure with a DATE
parameter, this is how you can add the parameter in ADO (without the
need for COleDateTime)....
// Converts a unix timestamp into one that ADO can decipher
double * UnixTimestampToVariantTime(time_t unixTimestamp)
{
double *dblDBTS = new double;
SYSTEMTIME dbDate;
ZeroMemory(&dbDate, sizeof(SYSTEMTIME));
// Get the tm Struct for the specified unix timestamp
struct tm *timeUnits = localtime(&unixTimestamp);
// Calculate and return the Variant time for the populated SYSTEMTIME
struct
SystemTimeToVariantTime((LPSYSTEMTIME)&dbDate, dblDBTS);
return dblDBTS;
}