Skip to main content
Skip table of contents

printDateTimeExpression() Operation


Syntax
NONE
set aString = aDateTime.printDateTimeExpression(aFormat); 
set aString = aDateTime.printDateTimeExpression(aFormat, aTimezone);
Semantics
printDateTimeExpression() converts a DateTime to a String using the given aFormat expression. The format expression is either a predefined constant or a string with placeholders for date/time variables (see Date and Time Formatting). Optionally, a time zone can be given, too.
SubstitutablesaDateTime Can be any variable or object attribute having the type DateTime.  
aFormat This String defines the format of the printed date time expression. The formatting rules can be found in Date and Time Formatting.
aTimezone This optional String parameter defines the time zone. A list of all valid time zones can be found in Time Zones. If no time zone is given, the Runtime assumes UTC.
aString Semantically, this is the lexical representation of a DateTime object following the format specification given in aFormat in time zone aTimezone.
Examples
NONE
set aString = aDateTime.printDateTimeExpression("sap-idoc-tims"); 
set aString = aDateTime.printDateTimeExpression("%d.%m.%Y %H:%M:%S", "Australia/Tasmania");
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.