TimeValue Function


TimeValue Function

Class

Microsoft.VisualBasic.DateAndTime

Syntax

     Dim result As Date = TimeValue(stringTime) 


stringTime (required; String)

A string containing any valid time format

Description

The TimeValue function converts stringDate to the Date data type, setting any date component to January 1, 1 AD. The interpretation of the time components in the expression is based on the locale setting of the local computer.

Usage at a Glance

If stringTime is invalid or Nothing, a runtime error is generated.

Version Differences

In VB 6, TimeValue returns the time only. Under .NET, the function also returns the base date of January 1, 1 AD.

See Also

DateValue Function, TimeOfDay Property, TimeSerial Function, TimeString 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