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.
' This code is licensed according to the terms and conditions listed here.
' 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
Go back to the alphabetical Function listing.
Go back to the Reference section index.
Last Modified: October 2, 1999
This page is copyright © 1999 Paul Kuliniewicz.
Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/g/getsystemtime.html