postgresql -sql

select * from task where to_date(deadline, ‘yyyymm‘)<to_date(‘201909‘, ‘yyyymmdd‘)//查询指定月份之前

 

 

 

select * from task where to_date(deadline, ‘yyyymmdd‘)<now()   //查询当前日期之前