Declare Sub GetSystemTime Lib "kernel32.dll" (lpSystemTime As SYSTEMTIME)
GetSystemTime retrieves the current system date and time and places it into a SYSTEMTIME structure. Times are always reported in UTC time (Coordinated Universal Time, a.k.a. Greenwich Mean Time (GMT)), not in the system's local time.
GetSystemTime does not return a value.
None.
' Display the current time in UTC time (along the Prime Meridian).
Dim utctime As SYSTEMTIME ' receives time and date
GetSystemTime utctime ' put the time and date in UTC time into utctime
Debug.Print "In Greenwich, England, the time is"; utctime.wHour; ":"; utctime.wMinute; ":"; utctime.wSecond
GetLocalTime, GetSystemTimeAsFileTime, SetSystemTime
Last Modified: October 2, 1999
This page is copyright © 1999 Paul Kuliniewicz. Copyright Information