-
File creation date
I am trying to get the date that a file was created into a character array by using the windows api I have been doing the following:
static HANDLE h;
WIN32_FIND_DATA wfd;
char creation [64];
h = FindFirstFile ("myfile.c", &wfd);
sprintf(creation, "%i",wfd.ftCreationTime.dwHighDateTime);
but all I get is a bunch of garbage, anyone know how I can parse this data up so that it becomes something meaningful?
-
-
you got to convert the ftCreationTime value to SYSTEMTIME structure with FileTimeToSystemTime API and don't forget to offet with the bias value that you set in your computer regional setting. This can be obtain with GetTimeZoneInformation API.
regards,
Chris.C