GmtTime Property


GmtTime Property

Location

My.Computer.Clock.GmtTime

Syntax

     Dim result As Date = My.Computer.Clock.GmtTime 

Description

The GmtTime property returns the current date and time as represented in Universal Coordinated Time (UTC), which is equivalent to Greenwich Mean Time (GMT).

Usage at a Glance

This property is read-only.

Example

The following code displays the current UTC time in a message box.

     MsgBox("If you were in London, your watch would read " & _        Format(My.Computer.Clock.GmtTime, "HH:mm")) 

Related Framework Entries

  • Microsoft.VisualBasic.Devices.Clock.GmtTime Property

  • System.DateTime.UtcNow Property

See Also

Clock Object, LocalTime Property, TickCount Property




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net