postgresql
PG库date类型数据对应的oracle中todate
日期格式的查询:SELECT COUNT(*) FROM si_test where si.date_create BETWEEN to_timestamp('2018-05-15 20:30','yyyy-mm-dd hh24:mi:ss') AND to_timestamp('2018-05-15 21:30','yyyy-mm-dd hh24:mi:ss') ;
PG库中查找当前日期小于5小时的
Select * from table t where t.create_date <= now() - INTERVAL '5 hour';