Export (0) Print
Expand All

FileTimeToSystemTime function

Converts a file time to system time format. System time is based on Coordinated Universal Time (UTC).

Syntax


BOOL WINAPI FileTimeToSystemTime(
  _In_   const FILETIME *lpFileTime,
  _Out_  LPSYSTEMTIME lpSystemTime
);

Parameters

lpFileTime [in]

A pointer to a FILETIME structure containing the file time to be converted to system (UTC) date and time format.

This value must be less than 0x8000000000000000. Otherwise, the function fails.

lpSystemTime [out]

A pointer to a SYSTEMTIME structure to receive the converted file time.

Return value

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.

Remarks

Windows Phone 8: This API is supported.

Windows Phone 8.1: This API is supported.

Examples

For an example, see Retrieving the Last-Write Time.

Requirements

Minimum supported client

Windows XP [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2003 [desktop apps | Windows Store apps]

Header

FileAPI.h (include Windows.h);
WinBase.h on Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

DosDateTimeToFileTime
File Times
FILETIME
FileTimeToDosDateTime
SYSTEMTIME
SystemTimeToFileTime
Time Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft