GetServerTime Method
- Last UpdatedNov 06, 2025
- 1 minute read
The GetServerTime() method retrieves the current date and time on the database server. This method is used to synchronize clocks.
'Declaration
Public Shared Sub GetServerTime( _
ByRef serverTime As Date, _
ByRef dbLocalTime As Date, _
ByRef dbGMTTime As Date _
)
public static void GetServerTime(
out DateTime serverTime,
out DateTime dbLocalTime,
out DateTime dbGMTTime
)
Parameters
- serverTime
Output. Holds the database time in the caller's local time zone.
- dbLocalTime
Output. Holds the database time in the DB local time zone.
- dbGMTTime
Output. Holds the database time in UTC.