TEXTTOTIME

Use TEXTTOTIME when you want to convert an object defined as text that is in HHMM or HHMMSS presentation, to an item defined as time.

For greater flexibility, use the TODATETIME function for specifying the format of the text item that is to be converted to a date/time.

Syntax:
TEXTTOTIME ( single-text-expression )
Meaning:
TEXTTOTIME ( text_to_convert_to_time )
Returns:
A single time

The text_to_convert_to_time must be in HHMM or HHMMSS presentation. HH is a two-digit hour in a 24-hour format. If the result is being assigned to a time object, the resulting time looks like the output object. Otherwise, the resulting time looks like the input argument. If the input argument is in error (for example, it is not a valid time), the result is "none".

Examples

  • TEXTTOTIME ( CallTime )

    Returns CallTime as a time item

Related functions

  • DATETOTEXT
  • TEXTTONUMBER
  • FROMDATETIME
  • TIMETOTEXT
  • NUMBERTOTEXT
  • TODATETIME
  • TEXTTODATE