6.1.2.4.1.11 TimeSerial

Function Declaration

 Function TimeSerial(Hour As Integer, 
                     Minute As Integer, 
                     Second As Integer) As Variant 

Parameter

Description

Hour

An Integer data value (section 2.1) in the range 0 and 23, inclusive.

Minute

An Integer data value (section 2.1).

Second

An Integer data value (section 2.1).

 

Runtime Semantics.

§ Returns a Date containing the time for a specific hour, minute, and second.

§ To specify a time, such as 11:59:59, the range of numbers for each TimeSerial argument SHOULD be in the normal range for the unit; that is, 023 for hours and 059 for minutes and seconds. However, one can also specify relative times for each argument using any Integer data value that represents some number of hours, minutes, or seconds before or after a certain time.

§ When any argument exceeds the normal range for that argument, it increments to the next larger unit as appropriate. For example, if Minute specifies 75 minutes, it is evaluated as one hour and 15 minutes. If the time specified by the three arguments causes the date to fall outside the acceptable range of dates, an error is raised.