BOOL DosDateTimeToFileTime(wDOSDate, wDOSTime, lpft) | |||||
WORD wDOSDate; | /* 16-bit MS-DOS date | */ | |||
WORD wDOSTime; | /* 16-bit MS-DOS time | */ | |||
LPFILETIME lpft; | /* address of buffer for 64-bit file time | */ |
The DosDateTimeToFileTime function converts MS-DOS date and time values into a 64-bit file time.
wDOSDate
Specifies the MS-DOS date. The date is a 16-bit value with the following format:
Bits | Contents |
0–4 | Day of the month (1–31) |
5–8 | Month (1 = January, 2 = February, etc.) |
9–15 | Year offset from 1980 (add 1980 to get actual year) |
wDOSTime
Specifies the MS-DOS time. The time is a 16-bit value with the following format:
Bits | Contents |
0–4 | Second divided by 2 |
5–10 | Minute (0–59) |
11–15 | Hour (0–23 on a 24-hour clock) |
lpft
Pointer to the converted 64-bit file time (a FILETIME structure).
The FILETIME structure has the following format:
typedef struct _FILETIME { /* ft */
DWORD dwLowDateTime; /* low 32 bits */
DWORD dwHighDateTime; /* high 32-bits */
} FILETIME, *PFILETIME, *LPFILETIME;
The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.
FileTimeToDosDateTime, FileTimeToSystemTime, SystemTimeToFileTime