TIMETOTEXT

You can use the TIMETOTEXT function to perform text concatenation. For greater flexibility, use the FROMDATETIME function for specifying the format of the resulting text item.

TIMETOTEX converts a time object or expression to a text item.

Syntax:
TIMETOTEXT ( single-time-expression )
Meaning:
TIMETOTEXT ( time_to_convert_to_text )
Returns:
A single text item

If time_to_convert_to_text is a time object name, this returns the time as a text item formatted according to the presentation of the input date object.

If time_to_convert_to_text is a time expression produced by a function, this returns the time as a text item formatted according to the presentation of the output argument of that function.

Examples

  • TIMETOTEXT ( LeadTime )

    In this example, LeadTime is converted from a time to text. If LeadTime has an HH:MM presentation, the resulting text item will be of that presentation.

  • TIMETOTEXT ( CURRENTDATETIME ( "{HH:MM:SS}" ) )

    Here, CURRENTDATETIME evaluates and returns a time in HH:MM:SS format. Then, TIMETOTEXT evaluates and returns a text string that is that time in HH:MM:SS format.

Related functions

  • DATETOTEXT
  • FROMDATETIME
  • NUMBERTOTEXT
  • TEXTTODATE
  • TEXTTONUMBER
  • TEXTTOTIME
  • TODATETIME