更新时间:2024-06-29 GMT+08:00

TIMESTAMP

输入:TIMESTAMP,使用FORMAT

FORMAT短语设置特定TIME或TIMESTAMP列或值的格式。FORMAT短语会覆盖系统格式。

1
2
SELECT 'StartDTTM' as a
             ,CURRENT_TIMESTAMP (FORMAT 'HH:MI:SSBMMMBDD,BYYYY');

输出

1
2
SELECT 'StartDTTM' AS a 
             ,TO_CHAR( CURRENT_TIMESTAMP ,'HH:MI:SS MON DD, YYYY' ) ;

TIMESTAMP类型转换

输入

1
COALESCE( a.Snd_Tm ,TIMESTAMP '0001-01-01 00:00:00' )

输出

1
COALESCE( a.Snd_Tm , CAST('0001-01-01 00:00:00' AS TIMESTAMP) )