除法呀
ns?晕倒TIME t;
......//得到t值DWORDLONG tt;
tt=(t.HighTime)<<4+t.LowTime;
tt=tt/10000;//得到秒数
....
剩下的你就根据闰年的规则推算吧:)
ns?晕倒TIME t;
......//得到t值DWORDLONG tt;
tt=(t.HighTime)<<4+t.LowTime;
tt=tt/10000;//得到秒数
....
剩下的你就根据闰年的规则推算吧:)
里面的FILETIME和你用的TIME的结构相同。BOOL FileTimeToSystemTime(
CONST FILETIME *lpFileTime, // pointer to file time to convert
LPSYSTEMTIME lpSystemTime // pointer to structure to receive
// system time
);FILETIME
The FILETIME structure is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601. typedef struct _FILETIME { // ft
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME;
VC的time_t也是这么存放数据的,之不过是从1970开始而已,而且最小单位是秒我曾经做过一个程序计算当前到任意日期之间的间隔(年、月、日、h,m,s),就是这么做的。
你有什么好方法?