Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference FROMDATETIME
Functions and Expressions Reference Guide
112
FROMDATETIME
The FROMDATETIME function converts a date/time item to a text string of a
specified format.
Syntax
FROMDATETIME (single-character-date-time-item
[ , single-text-expression ] )
Meaning
FROMDATETIME (date_time [ , date_time_format_string ] )
Returns
This function returns a single-character_text_item.
Returns the date/time specified by date_time as a text item with the format
specified by date_time_format_string. If date_time_format_string is not
specified, date_time will be returned in the same format as the date_time.
The date_time_format_string must conform to the date/time format strings as
described in Appendix B - Format Strings.
Examples
HeaderLine="Today is" + FROMDATETIME (CURRENTDATE (),"{MON
DD, CCYY}")
If the current system date is March 3, 1999, this rule evaluates to Today is
Mar 03, 1999.
FROMDATETIME ( TransactionTimeStamp Column:.:TransHistory )
If the value of TransactionTimeStamp Column is 10:14 A.M. on February 3,
2000 and its format is defined as "{CCYYMMDDHHMM}", this function returns
200002031014.
EXTRACT (Expense:Report, FROMDATETIME (Date:Expense:Report,
"{MM}" ) = "03")
In this example, the FROMDATETIME function is used in the condition
expression of the
EXTRACT function to identify all expenses in the month of
March.