PostgreSQL将日期转为当前年、月、日的函数date_trunc PostgreSQL将日期转为年、月、日的函数date_trunc: 当前年: select date_trunc('year',now()) 当前月: select date_trunc('month',now()) 当前日: select date_trunc('day',now()) 当前时: select date_trunc('hour'... 2020-12-17/ 844 次浏览/ DBA运维