Name
TimeSerial Function — Microsoft.VisualBasic.DateAndTime
Synopsis
TimeSerial(hour
,minute
,second
)
hour
required; IntegerA number in the range 0 to 23
minute
required; IntegerAny valid integer
second
required; IntegerAny valid integer
Return Value
A Date representing the time specified by the arguments to the function
Description
Constructs a valid time given a number of hours, minutes, and
seconds. Any of the arguments can be specified as relative values or
expressions. The hour
argument requires a
24-hour clock format; however, the returned time is determined by the
system’s regional settings.
If any value is greater than the normal range for the time unit to which it relates, the next higher time unit is increased accordingly. For example, a second argument of 125 will be evaluated as 2 minutes, 5 seconds.
If any value is less than zero, the next higher time unit is
decreased accordingly. For example,
TimeSerial(2,-1,30)
returns 01:59:30.
Get VB.NET Language Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.