Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Converts a system time to file time format. System time is based on Coordinated Universal Time (UTC).
BOOL SystemTimeToFileTime(
[in] const SYSTEMTIME *lpSystemTime,
[out] LPFILETIME lpFileTime
);
[in] lpSystemTime
A pointer to a SYSTEMTIME structure that contains the system time to be converted from UTC to file time format.
The wDayOfWeek member of the SYSTEMTIME structure is ignored.
[out] lpFileTime
A pointer to a FILETIME structure to receive the converted system time.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Note
A False return value can indicate that the passed SYSTEMTIME structure represents an invalid date. Certain situations, such as the additional day added in a leap year, can result in application logic unexpectedly creating an invalid date. For more information on avoiding these issues, see leap year readiness.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] |
Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
Target Platform | Windows |
Header | timezoneapi.h (include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today