【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 )

 

上一篇:scrapy meta不用pipe用命令-o


下一篇:代码审计_extract变量覆盖