时间:2021-07-01 10:21:17 帮助过:4人阅读
-- 取季初那一天
select date_trunc( ‘quarter‘,cast(‘20150820‘ as date))
-- 取季末那一天
select add_months(date_trunc( ‘quarter‘,cast(‘20150820‘ as date)) + INTERVAL ‘-1 day‘,3)
-- 取上季末那一天
select date_trunc( ‘quarter‘,cast(‘20150820‘ as date)) + INTERVAL ‘-1 day‘
-- 取上季初那一天
select add_months(date_trunc( ‘quarter‘,cast(‘20150820‘ as date)),-3)
netezza 数据库 取 季初 季末 时间
标签: