TimeSerial Function


TimeSerial Function

Class

Microsoft.VisualBasic.DateAndTime

Syntax

     Dim result As Date = TimeSerial(hour, minute, second) 


hour (required; Integer)

The hour, a number between 0 and 23, inclusive


minute (required; Integer)

The minute, a number between 0 and 59, inclusive


second (required; Integer)

The second, a number between 0 and 59, inclusive

Description

The TimeSerial function returns a Date with the value that is specified by the three time components.

Usage at a Glance

  • The hour argument requires a 24-hour clock format.

  • If an element exceeds its normal limits in either a positive or negative direction, TimeSerial adjusts the time accordingly. For example, if you specify TimeSerial(11, 35, 82)11:35:82TimeSerial returns 11:36:22.

  • If any of the parameters exceed the range of the Integer data type, a runtime error occurs.

See Also

DateSerial Function, TimeOfDay Property, TimeString Property, TimeValue Function




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