TimeSerial - Built-in Date & Time Function¶
Purpose¶
TimeSerial returns a time from the specified hour, minute, and second.
Syntax¶
TimeSerial(hour, minute, second)
Arguments¶
| Argument | Required | Description |
|---|---|---|
hour |
Yes | Any valid integer expression containing the hour |
minute |
Yes | Any valid integer expression containing the minute |
second |
Yes | Any valid integer expression containing the second |
Returns¶
Variant with time value
See also¶
- Date
- DateAdd
- DateDiff
- DatePart
- DateValue
- DateSerial
- Day
- Hour
- InAgedToDays
- InLast4WeeksToSunday
- InLast7Days
- InLastFullMonth
- InLastFullWeek
- InLastYearMTD
- InLastYearYTD
- InLeapYear
- Minute
- Month
- MonthName
- Now
- Second
- Time
- TimeValue
- WeekAgo
- Weekday
- WeekdayName
- Year
Example¶
Dim dtTime
// returns Saturday, December 30, 1899 6:15:00 AM
Let dtTime = TimeSerial((12 - 6), 15, 0)
Return dtTime
In a filter function¶
return TimeValue(Orderheader.Order_Date)=TimeSerial(0,0,0)
Notes¶
- When the arguments cannot be converted to the specified type, a runtime error is generated.
- TimeSerial returns a datetime with the date portion set to December 30, 1899.
- To print only the time, either format the field (via field properties, choosing NONE for the date portion) or use the FormatTime function.