create date(value a, adjustable template b)
Group |
This function is deprecated.
For new profile implementations, please use create date strict(value a, adjustable template b, default c, [locale d]) instead.
Returns a Timestamp based on the value in a and the adjustable format template b. If in the error case the value cannot be parsed, the result of the function is the current date with set Empty Flag. If a already has the data type Timestamp or Date, a conversion is not necessary. In this case, parameter b has to remain empty.
Description of Parameters
Parameter |
Description |
a |
Text to be interpreted. If the text cannot be interpreted, the function returns the current date with set Empty Flag. Note: If an actual Date or Timestamp object is specified here instead of a text, parameter b has to remain empty. |
b |
The date format template. Important note: If the string in a is shorter than the template in b, b is shortened to the length of a. Please note that in rare cases this can lead to loss of accuracy or invalid values and consequential errors. Special case W3CDTF: This format template does not consist of placeholders. Therefore, no shortening is done. |
Examples
Current date of this example: 2011-10-20 15:33:23.0
Parameter a |
Parameter b |
Result |
241205 |
ddMMyyHHmm |
2005-12-24 00:00:00.0 |
No date |
ddMMyyHHmm |
2011-10-20 15:33:23.0 |
2412050820 |
ddMMyyHHmm |
2005-12-24 08:20:00.0 |
1997-07-16T19:20:30Z (see format template W3CDTF) |
W3C |
1997-07-16 21:20:30.0 |