tryCastDate
You are looking at an older version of the documentation. The latest version is found here.
This procedure attempts to cast a string value to date and returns NULL instead of an error when this is impossible. If the original value is NULL, the returned value will also be NULL.
Parameters
| Parameter | Description |
|---|---|
originalValue | Original value as a string |
format | Format of the date as a string |
checkFormatRegex | Regex format of the date as a string |
Attributes
| Attribute | Type | Description |
|---|---|---|
| date | Value cast to the new type |
Example
CALL UTILS.tryCastDate(
originalValue => '20181207',
format => 'yyyy-MM-dd'
);;
Auto-parsing is available for the date string:
yyyy-MM-dd