toDate(value a, format b)
Group |
Returns the date created from an EDIFACT DTM segment using the format identifier a and the encoded date value b. See examples.
If a format code is used that is not allowed or a coded date value that does not match the format code, the function terminates with an error (see examples).
Description of Parameters
Parameter |
Description |
a |
Encoded date value. |
b |
Format code . Allowed codes: 2-4, 6-9, 101-103, 105-106, 610, 616. Important note: Only format codes without a time component are accepted. Codes like 203 are not accepted. For the codes, see e.g. https://www.edifactory.de/edifact/directory/D96A/data-element/2379 or similar sites. |
Examples
Parameter a |
Parameter b |
Result |
120206 |
101 |
2012-02-06 |
1202 |
101 |
Termination with an error (invalid value). |