このプロシージャは、文字列値をタイムスタンプにキャストしようと試み、それが不可能な場合にエラーの代わりにNULLを返します。元の値がNULLの場合、返される値もNULLとなります。
Parameters
Parameter | Description |
|---|---|
| Original value as a string |
| Format of the date and time as a string |
| Regex format of the date and time as a string |
Attributes
Attribute | Type | Description |
|---|---|---|
| timestamp | Value cast to the new type |
Example
CALL UTILS.tryCastTimestamp( originalValue => '2018-10-21 10:05:02.987', format => 'yyyy-MM-dd hh:mm:ss.SSS');; TIMESTAMP 文字列の自動解析が可能です:
yyyy-MM-dd
yyyy-MM-dd HH:mm:ss
yyyy-MM-dd HH:mm:ss.S
yyyy-MM-ddTHH:mm:ss
yyyy-MM-ddTHH:mm:ss.S