DIAdem Help

Method: TimeSerial for VBS

  • Updated2024-09-12
  • 1 minute(s) read

Method: TimeSerial for VBS

Specifies the time in hours, minutes, and seconds.

vTimeSerial = Object.TimeSerial(Hour, Minute, Second)
ObjectVBS
Object with this method. You do not need to specify this object.
HourVariant
Specifies a number in the range between 0 and 23.
MinuteVariant
Specifies any numeric expression. If the value is greater than 59, the method TimeSerial transfers the amount to the next larger unit. If the value is smaller than 0, the method transfers the amount to the next smaller unit.
SecondVariant
Specifies any numeric expression. If the value is greater than 59, the method TimeSerial transfers the amount to the next larger unit. If the value is smaller than 0, the method transfers the amount to the next smaller unit.
vTimeSerialVariant
Receives the time.

The following example generates a time value with hours, minutes and seconds:

Dim MyTime
MyTime = TimeSerial(6, -15, 0) 
Call MsgBox(MyTime) ' Returns 5:45:00 AM

Related Topics

DateAdd | DateDiff | DatePart | DateSerial | DateValue | Date | Day | Hour | Minute | MonthName | Month | Now | Second | TimeSerial | TimeValue | Time | Timer | Weekday | WeekdayName | Year