Assembly: Microsoft.VisualBasic (in microsoft.visualbasic.dll)
Required. String expression representing a date/time value from 00:00:00 on January 1 of the year 1 through 23:59:59 on December 31, 9999.
Return ValueReturns a Date value containing the time information represented by a string, with the date information set to January 1 of the year 1.
For more detailed information, see the Visual Basic topic TimeValue Function (Visual Basic).
You can enter valid times using a 12-hour or 24-hour clock. For example, "2:24 P.M." and "14:24" are both valid StringTime arguments.
If the StringTime argument includes date information, TimeValue does not include it in the returned value. However, if StringTime includes invalid date information, for example "January 32," an InvalidCastException error occurs.
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Other ResourcesTimeValue Function (Visual Basic)
DateSerial Function (Visual Basic)
DateValue Function (Visual Basic)
Hour Function (Visual Basic)
Second Function (Visual Basic)
TimeSerial Function (Visual Basic)