Function reference
Converts a string to a time datatype.

Time ( string )

Argument Description
string or datetime A string containing a valid time (such as 8 am or 10:25) that you want returned as a time datatype. Only the hour is required; you do not have to include the minutes, seconds, or microseconds of the time or am or pm. The default value for minutes and seconds is 00 and for microseconds is 000000. am or pm is determined automatically. Also, a datetime value is accepted

Data type: Time
Returns the time in string as a time datatype. If string does not contain a valid time, Time returns 00:00:00.

Example 1
This expression returns the time datatype for 45 seconds before midnight (23:59:15)
Time(‘23:59:15’)

Last modified: 29 May 2021