Syntax | Code Block |
---|
| set aDateTime = aDurationString.convertDurationToDateTime()
set aDateTime = convertDurationToDateTime(LITERAL) |
|
---|
Semantics | Converts a string having the XML Schema Duration |
---|
(http://www.w3.org/TR/xmlschema-2/#duration) format into a DateTime object. Duration |
Anchor |
---|
5_e2e_action_language_5_10_strin_2382 | 5_e2e_action_language_5_10_strin_2382 | may may be expressed using all the parts of a DateTime type (from year to fractions of a second) and are, therefore, defined as a "six-dimensional space". As the relation between some of the date parts is not fixed (such as the number of days in a month), the order relationship between durations is only partial and the result of a comparison between two durations may be undetermined. The lexical space of xsd:duration is the format defined by ISO 8601 under the form |
"". The capital letters are delimiters and can be omitted when the corresponding member is not used. Example: |
values include "PT1004199059S", "PT130S", "PT2M10S", "P1DT2S", "-P1Y", or "P1Y2M3DT5H20M30.123S". The following values would be invalid: "1Y" Values | PT1004199059S PT130S PT2M10S P1DT2S -P1Y P1Y2M3DT5H20M30.123S
|
---|
Invalid Values | 1Y (leading "P" is missing)
|
---|
|
, "" - ("T" separator is missing)
|
|
, "" - (all parts must be positive)
- P1Y-1M (all parts must be positive)
|
|
, "" - (parts order is significant and Y must precede M
|
|
), or "P1Y-1M" (all parts must be positive. |
Substitutables | aString | Can be any variable or object attribute having the type String. The format must correspond to the XML Schema Duration format. |
---|
LITERAL | String literal. The format must correspond to the XML Schema Duration format. |
Error Codes | Find the related error codes on System Errors of type conversion operations. |
---|
Examples | This example generates a DateTime object that corresponds to the duration of two days. This object can then be used to do time |
---|
Anchor |
---|
5_e2e_action_language_5_10_strin_8335 | 5_e2e_action_language_5_10_strin_8335 | arithmeticarithmetic, that is, adding and subtracting durations from dates.
|
A UML You can find a xUML example of how to apply durations |
can be found