Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference CURRENTDATETIME
Functions and Expressions Reference Guide
81
CURRENTDATETIME
The CURRENTDATETIME function returns the current system date and time.
Syntax
CURRENTDATETIME ( [ single-text-expression ] )
Note Even when using CURRENTDATETIME without an argument, it does require
parentheses.
Meaning
CURRENTDATETIME ( [ date_time_format_string ] )
Returns
This function returns a single-date-time.
Returns the system date and time in the format specified by
date_time_format_string or with a CCYYMMDDHHMMSS presentation if no
date_time_format_string is provided.
The date_time_format_string must conform to the date/time format strings as
described in Appendix B - Format Strings.
Example
StartDateTime = CURRENTDATETIME ( )
In this example, StartDateTime is assigned the value of the current date and
time. In this example, because
CURRENTDATETIME is assigned to an output, it
is automatically converted to the presentation of StartDateTime. If
CURRENTDATETIME evaluates to 3:04pm on 6/24/1999 and StartDateTime
has a YYMMDDHH12MM presentation, the result is 9906240304.
CURRENTDATETIME ( "{MM.DD.CCYY HH24:MM}" )
In this example, the current date is returned in MM.DD.CCYY HH24:MM format.
If it is currently 4:12 pm on January 5, 1999, the date returned would be
01.05.1999 16:12.