Here's one way:
Code:
Option Explicit
Private 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
Private Declare Sub GetSystemTime Lib "kernel32.dll" (lpSystemTime As SYSTEMTIME)
Private Declare Sub GetLocalTime Lib "kernel32.dll" (lpSystemTime As SYSTEMTIME)
Private Sub Form_Load()
Dim st As SYSTEMTIME
' GetSystemTime st GMT
GetLocalTime st
Debug.Print st.wMonth, st.wDay, st.wYear
Debug.Print st.wHour, st.wMinute, st.wSecond, st.wMilliseconds
End Sub