This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).
typedef struct _FILETIME { DWORD dwLowDateTime; DWORD dwHighDateTime;} FILETIME, *PFILETIME, *LPFILETIME;dwLowDateTime
The low-order part of the file time.
dwHighDateTime
The high-order part of the file time.
To convert aFILETIME structure into a time that is easy to display to a user, use theFileTimeToSystemTime function.
It is not recommended that you add and subtract values from theFILETIME structure to obtain relative times. Instead, you should copy the low- and high-order parts of the file time to aULARGE_INTEGER structure, perform 64-bit arithmetic on theQuadPart member, and copy theLowPart andHighPart members into theFILETIME structure.
Do not cast a pointer to aFILETIME structure to either aULARGE_INTEGER* or__int64* value because it can cause alignment faults on 64-bit Windows.
Not all file systems can record creation and last access time and not all file systems record them in the same manner. For example, on NT FAT, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day (really, the access date). On NTFS, access time has a resolution of 1 hour. Therefore, theGetFileTime function may not return the same file time information set using theSetFileTime function. Furthermore, FAT records times on disk in local time. However, NTFS records times on disk in UTC. For more information, seeFile Times.
A function using theFILETIME structure can allow for values outside of zero or positive values typically specified by thedwLowDateTime anddwHighDateTime members. For example, theSetFileTime function uses 0xFFFFFFFF to specify that a file's previous access time should be preserved. For more information, see the topic for the function you are calling.
For an example, seeChanging a File Time to the Current Time orRetrieving the Last-Write Time.
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] |
| Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
| Header | minwinbase.h (include Windows.h) |
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?