Page tree
Skip to end of metadata
Go to start of metadata

set aString = aDateTime.printDateTimeExpression(aFormat); 
set aString = aDateTime.printDateTimeExpression(aFormat, aTimezone);
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.
set aString = aDateTime.printDateTimeExpression("sap-idoc-tims"); 
set aString = aDateTime.printDateTimeExpression("%d.%m.%Y %H:%M:%S", "Australia/Tasmania");
  • No labels