TimeValue - Built-in Date & Time Function¶
Purpose¶
TimeValue returns a time from the specified expression.
Syntax¶
Timevalue(str)
Arguments¶
| Argument | Required | Description |
|---|---|---|
str |
Yes | Any valid string expression containing the time |
Returns¶
Variant with date value
See also¶
- Date
- DateAdd
- DateDiff
- DatePart
- DateSerial
- DateTimeSerial
- DateValue
- Day
- Hour
- InAgedToDays
- InLast4WeeksToSunday
- InLast7Days
- InLastFullMonth
- InLastFullWeek
- InLastYearMTD
- InLastYearYTD
- InLeapYear
- Minute
- Month
- MonthName
- Now
- Second
- Time
- WeekAgo
- Weekday
- WeekdayName
- Year
Examples¶
// returns Saturday, December 30, 1899 12:34:00 PM
Return TimeValue("12:34")
// returns the time of now, so current time. The result is identical to Time()
Return TimeValue(Now())
Notes¶
- When the argument cannot be converted to a datetime value, a runtime error is generated.
- TimeValue uses the locale settings to determine the date.
- TimeValue returns a datetime variable 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.