The TextToTime function is a built-in function that converts Text t to a time value.

If t can't be converted to a valid Time value, the function will return the Time default value. To check if the conversion is possible you can use the TextToTimeValidate function.

Input parameters

t: Text Type

Output parameters

Time Type

Examples

Usage

Result

TextToTime( "12:12:12" )

#12:12:12#

TextToTime( "23:68:12" )

#00:00:00#

TextToTime( "0-0-0" )

#00:00:00#

TextToTime( "abc" )

#00:00:00#

Remarks

You should check the limits of the Time data type. You should also ensure that the time you type in the argument complies with the time format (hh:mm:ss).

See Also

TextToTimeValidate Function | Available Conversion Functions to Time | Available Built-in Functions