comp • gb.util • date • toutc

Date.ToUTC (gb.util)

Static Function ToUTC ( Date As Date ) As Date

Move a date so that its local representation after the move is its UTC representation before the move.

Example

' How to display the UTC representation of a french date
Use "gb.util"
Dim dNow As Date = Now
Print Format$(dNow, "yyyy-mm-dd hh:nn:ss")
Print Format$(Date.ToUTC(dNow), "yyyy-mm-dd hh:nn:ss")
Print CStr(dNow)
2019-07-13 15:54:17
2019-07-13 13:54:17
07/13/2019 13:54:17.024