VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

UTC Time/Date Functions UPDATED

Mark Mokoski  (14 Submissions)   VB function enhancement   Visual Basic 5.0   Beginner   Wed 3rd February 2021

Updated 12-APR 2005! Add UTC time offset from Local time and formats Time / Date based on country/regional settings. Function module for getting UTC (GMT) time and date. Demo program shows how UTC functions relate to standard VB time/date functions. Being a Ham Radio and Shortwave geek, I needed UTC time a lot for logging and schedule time conversions. Comments welcome

Returns
Returns time or date in different formats. See code in code module

API Declarations
Private Declare Sub GetSystemTime Lib "kernel32" (lpSystemTime As SYSTEMTIME)
Private Declare Function GetTimeZoneInformation Lib "kernel32" (lpTimeZoneInformation As TIME_ZONE_INFORMATION) As Long
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 Type TIME_ZONE_INFORMATION
Bias As Long
StandardName(32) As Integer
StandardDate As SYSTEMTIME
StandardBias As Long
DaylightName(32) As Integer
DaylightDate As SYSTEMTIME
DaylightBias As Long
End Type

Rate UTC Time/Date Functions UPDATED (13(13 Vote))

Download UTC Time/Date Functions UPDATED

UTC Time/Date Functions UPDATED Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters