Skip to main content
Skip table of contents

printDateTimeExpression() Operation

Syntax

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 Patterns). Optionally, a time zone can be given, too.

Substitutables

aDateTime

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 Patterns.

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 xUML 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");

ActionScript_Calculations_Example

Click here to download a simple example model that shows how to use Action Script to perform simple Integer, Float and DateTime calculations with Scheer PAS Designer.

ActionScript_Time_Conversions_Example

Click here to download a simple example model shows that different possibilities for DateTime conversions with Scheer PAS Designer.

JavaScript errors detected

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

If this problem persists, please contact our support.