postgreSQL 获取两个时间点内每个月第一天的日期。 [sql] view plaincopyprint? select date(zz) from generate_series(date_trunc('month',to_date('20150305','yyyymmdd')), date_trunc('month',to_date('20150705','yyyymmdd')),'1 month') as tt(zz); 结果为: