其他分享
首页 > 其他分享> > 【Teradata】日期类型处理

【Teradata】日期类型处理

作者:互联网

1.EXTRACT

YEAR | MONTH | DAY | HOUR | MINUTE | SECOND | TIMEZONE_HOUR | TIMEZONE_MINUTE

 SELECT EXTRACT (YEAR FROM CURRENT_DATE);

SELECT EXTRACT (MONTH FROM CURRENT_DATE+90); 

SELECT EXTRACT (DAY FROM '1996-12-12');

 

2. 

cast(((a.aactl_tch_end_tmstp - a.actl_tch_start_tmstp) second(4)) as integer)>=15 报错超出限制,改为如下语句

a.actl_tch_end_tstp > (a.actl_tch_start_tmstp + interval '15' second )

 

标签:Teradata,tmstp,second,日期,actl,tch,类型,EXTRACT,SELECT
来源: https://www.cnblogs.com/badboy200800/p/10472358.html