TIMESERIAL(hour, minute, second)
Returns the time for a specific hour, minute and second (Date).
|hour||The number between 0 and 23 representing the hour (Integer).|
|minute||The number between 0 and 59 representing the minute (Integer).|
|second||The number between 0 and 59 representing the second (Integer).|
|* This function can accept values outside the normal range. For example if you pass in 90 seconds it will return a time in the next minute and 30 seconds.|
* You can also specify relative times for each argument using any numeric expression that represents some number of hours, minutes, or seconds before or after a certain time. The following example uses expressions instead of absolute time numbers. The TimeSerial function returns a time for 15 minutes before (-15) six hours before noon (12 - 6), or 5:45:00 A.M.
* If any argument is outside -32,768 to 32,767 then an error occurs. Type Mismatch.
* The equivalent .NET function is Microsoft.VisualBasic.DateAndTime.TimeSerial
* For the Microsoft documentation refer to docs.microsoft.com
Debug.Print TimeSerial(12 - 6, -15, 0) = ??
Debug.Print TimeSerial(10,90,0) = 11:30 '90 minutes added
© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited Top