Click to Rate and Give Feedback
MSDN
MSDN Library
System Services
Time
Time Reference
Time Functions
 SystemTimeToFileTime Function
SystemTimeToFileTime Function

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

Syntax

C++
BOOL WINAPI SystemTimeToFileTime(
  __in   const SYSTEMTIME *lpSystemTime,
  __out  LPFILETIME lpFileTime
);

Parameters

lpSystemTime [in]

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.

lpFileTime [out]

A pointer to a FILETIME structure to receive the converted system 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.

Examples

For an example, see Changing a File Time to the Current Time.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

DosDateTimeToFileTime
FILETIME
FileTimeToDosDateTime
FileTimeToSystemTime
System Time
SYSTEMTIME
Time Functions

Send comments about this topic to Microsoft

Build date: 11/19/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Please move questions to Forums "In what case...?"      John A - MSFT   |   Edit   |   Show History
This isn't the best place for questions. The forums at http://forums.msdn.com are designed for questions and answers. If you receive a good answer, feel free to post it back here so others may benefit.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker