Teradata 日期函数

select to_month_end(date)
select extract(year/month/day from date)
select lastday(date/timestamp)
select (date-date) day(3)/month(3)/year(3)
select months_between(date,date)
select (time-time) hour(3)/minute(3)/second(3)
select current_timestamp - interval '2' hour/mibute/second
select current_date - interval '2' year/month/day/hour/minute/second
select next_day(date,'friday'/'fri')
select numtoyminterval(20,'month'/'year')

  

posted @ 2019-07-11 22:28  king_cobra_rko  阅读(1924)  评论(0编辑  收藏  举报