GetSystemTime

Aus API-Wiki
Wechseln zu: Navigation, Suche

Beispiel:

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" ( _
                ByRef lpSystemTime As SYSTEMTIME)
            
Private Sub Main()
    Dim udtUTC As SYSTEMTIME
    
    Call GetSystemTime(udtUTC)
    
    Debug.Print "UTC: " & Format$(TimeSerial(udtUTC.wHour, udtUTC.wMinute, udtUTC.wSecond), "hh\:nn\:ss")
End Sub

Verwandte Funktionen

GetLocalTime - Dasselbe in Grün
GetSystemTimeAsFileTime - Soch sowas ähnliches, aber anders