forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
4.0 KiB
4.0 KiB
TIMESTAMP
Input - TIMESTAMP with FORMAT
The FORMAT phrase sets the format for a specific TIME or TIMESTAMP column or value. A FORMAT phrase overrides the system format.
1 2 | SELECT 'StartDTTM' as a ,CURRENT_TIMESTAMP (FORMAT 'HH:MI:SSBMMMBDD,BYYYY'); |
Output
1 2 | SELECT 'StartDTTM' AS a ,TO_CHAR( CURRENT_TIMESTAMP ,'HH:MI:SS MON DD, YYYY' ) ; |
TIMESTAMP Typecasting
Input
COALESCE( a.Snd_Tm ,TIMESTAMP '0001-01-01 00:00:00' )
Output
COALESCE( a.Snd_Tm , CAST('0001-01-01 00:00:00' AS TIMESTAMP) )
Parent topic: Data Manipulation Language (DML)