このプロシージャは文字列値を日付にキャストしようとし、それが不可能な場合にエラーの代わりにNULL
を返します。元の値がNULL
の場合、返される値もNULL
となります。
Parameters
Parameter | Description |
---|---|
| Original value as a string |
| Format of the date as a string |
| 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'
);;
日付文字列の自動解析が可能です:
yyyy-MM-dd