I need the day-duration from a file. How long exists the file in days. I get the filetime I can convert it into a systemtime. But I need the duration in days. I don't like to calculate it alone. Now my question. Does any function exist how I can resolve this problem?
#include "stats.h"
// if you have the 2 FILETIMES we can do
__int64 iFile = INT64_FROM_FILETIME(file);
__int64 iToday = INT64_FROM_FILETIME(today);
__int64 iDiff = iToday - iFile;
// That tells us how many times 100 nanosecs there are
long lDays = iDiff / 864000000000; //100 nanosecs in a day
Bookmarks