Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference TIMETOTEXT
Functions and Expressions Reference Guide
206
TIMETOTEXT
The TIMETOTEXT function converts a time object or expression to a text item.
Syntax
TIMETOTEXT ( single-time-expression )
Meaning
TIMETOTEXT ( time_to_convert_to_text )
Returns
This function 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.
Example
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.
Uses
Use
TIMETOTEXT to perform text concatenation. The FROMDATETIME function
provides greater flexibility as to specifying the format of the resulting text
item.
Related Functions
DATETOTEXT, FROMDATETIME, NUMBERTOTEXT, TEXTTODATE,
TEXTTONUMBER, TEXTTOTIME, TODATETIME