Skip to main content
Skip table of contents

parseDateTimeExpression

Syntax

NONE
set aDateTime = aString.parseDateTimeExpression(aFormat)

Semantics

parseDateTimeExpression() initializes a DateTime object from a string using the given format expression. The format expression is a string with placeholders for date/time variables (see Date and Time Formatting Patterns).

The operation expects that aString conforms to the given format aFormat. If the string does not match with the given format, the xUML Runtime will raise an exception and not parse the string.
If conformity to the format is not guaranteed, you can use the match() Operation on aString to check before using parseDateTimeExpression.

Substitutables

aString

Can be any variable or object attribute having the type String.  

aFormat

Can be any variable or object attribute having the type String. The formatting rules can be found in Date and Time Formatting Patterns.

Error Codes

Find the related error codes on System Errors.

FUDSM/9 

Parsing of "..." failed, it does not match format expression "...".

Examples

NONE
set aDateTime = aString.parseDateTimeExpression("%d.%m.%Y %H:%M:%S");
JavaScript errors detected

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

If this problem persists, please contact our support.