PostgreSQL常用日期格式
时间相加减
select date_part('day', '2015-01-15 17:05'::timestamp - '2013-01-14 16:05'::timestamp);
select ('2015-01-15 17:05'::timestamp)::date - ('2015-01-14 19:05'::timestamp)::date;
select count(*) from tablename where adddate>timestamp '2016-11-14 00:00:00' and adddate < timestamp '2016-11-14 23:59:59';

浙公网安备 33010602011771号