LocalTime Property


LocalTime Property

Location

My.Computer.Clock.LocalTime

Syntax

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

Description

The LocalTime property returns the current date and time as represented by the current time zone settings.

Usage at a Glance

This property is read-only.

Example

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

     MsgBox("Look at your watch; it's " & _        Format(My.Computer.Clock.LocalTime, "h:mm tt")) 

Related Framework Entries

  • Microsoft.VisualBasic.Devices.Clock.LocalTime Property

  • System.DateTime.Now Property

See Also

Clock Object, GmtTime 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