Archived

This topic is now archived and is closed to further replies.

Zeblar Nagrim

FILETIME

Recommended Posts

Okey, I have 2 values in FILETIME format... and I need to find out how many houers there are between them. How to do that? Convert to LONGLONG and do a bitoperation? Or what?

Share this post


Link to post
Share on other sites
Microsoft recommends converting FILETIME structures to ULARGE_INTEGER structures before manipulating them. (Essentially the same as LONGLONG, except unsigned). IIRC, you can turn the FILETIMEs to ULARGE_INTEGERs, subtract them, convert the result back to a FILETIME, then you can use FileTimeToSystemTime to turn the result into SYSTEMTIME structure, where the difference in hours should be the wHour member variable.

Share this post


Link to post
Share on other sites