# SYSTEMTIME Type

    Type SYSTEMTIME
      wYear As Integer
      wMonth As Integer
      wDayOfWeek As Integer
      wDay As Integer
      wHour As Integer
      wMinute As Integer
      wSecond As Integer
      wMilliseconds As Integer
    End Type

SYSTEMTIME-type variables hold an exact date and time, down to the millisecond. There are two ways this type stores dates: absolute and relative. Absolute dates are "normal" dates, such as January 15, 1998 or December 25, 2001. Relative dates are dates such as "the 1st Sunday in June" or "the 3rd Wednesday in November", and are used when wYear is set to 0. Here, wDay specifies whether it is the first, second, third, fourth, or fifth (last) week.

wYear
  In absolute dates, the four-digit year. In relative dates, 0.
wMonth
  The number of the month. 1 is January, 2 is February, etc.
wDayOfWeek
  The number of the weekday. 0 is Sunday, 1 is Monday, etc.
wDay
  In absolute dates, the number of the day (such as 21 [of June]). In relative dates, 1 is the first, 2 is the second, through 5 is the fifth/last WhateverDay of the month.
wHour
  The hour, in 24-hour format.
wMinute
  The minutes.
wSecond
  The seconds.
wMilliseconds
  The milliseconds.

Used by: GetLocalTime, GetSystemTime, TIME_ZONE_INFORMATION
Back to the index.