Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This structure represents a date and time using individual members for the month, day, year, weekday, hour, minute, second, and millisecond.

Syntax

typedef struct _SYSTEMTIME {
  WORD 
wYear;
  WORD 
wMonth;
  WORD 
wDayOfWeek;
  WORD 
wDay;
  WORD 
wHour;
  WORD 
wMinute;
  WORD 
wSecond;
  WORD 
wMilliseconds;
} SYSTEMTIME;

Members

wYear

Specifies the current year.

wMonth

Specifies the current month; 1 indicates January, 2 February, and so on.

wDayOfWeek

Specifies the current day of the week; Sunday = 0, Monday = 1, and so on.

wDay

Specifies the current day of the month.

wHour

Specifies the current hour.

wMinute

Specifies the current minute.

wSecond

Specifies the current second.

wMilliseconds

Specifies the current millisecond.

Remarks

Millisecond granularity may not be supported by a hardware platform. The caller of this function should not rely on more than second granularity. It is not recommended that you add and subtract values from this structure to obtain relative times.

The following list shows tasks to perform instead:

  • Convert the SYSTEMTIMEstructure to a FILETIMEstructure.

  • Copy the resulting FILETIMEstructure to a ULARGE_INTEGERstructure.

  • Use usual 64-bit arithmetic on the ULARGE_INTEGERvalue.

Requirements

Header winbase.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also