VB.NET Language in a Nutshell

   
TimeValue Function

Class

Microsoft.VisualBasic.DateAndTime

Syntax

TimeValue( stringtime )

stringtime (required; String)

Any valid string representation of a time

Return Value

A Date containing the time specified by the string argument, with the date set to January 1 of the year 1

Description

Converts a string representation of a time to a Date data type

Rules at a Glance

Programming Tips and Gotchas

VB/NET/VB 6 Differences

In VB 6, TimeValue returns the time only. In VB.NET, the function also returns an invalid date, 01/01/0001, along with the time.

See Also

TimeOfDay Property, TimeSerial Function, TimeString Property

   

Категории