昨天数据
SELECT
*
FROM
sys_device
WHERE age(current_date,to_timestamp(substring(update_time FROM 1 FOR 10),'yyyy-MM-dd')) ='1 days';
今天数据
SELECT
*
FROM
sys_device
WHERE to_char(update_time:: DATE, ' yyyy-MM-DD hh 24: mi :s') = to_char(CURRENT_DATE:: DATE, ' yyyy-MM-DD hh 24: mi :s')