如何在Postgress sql中从午夜到现在获取所有记录

时间:2022-06-02 22:15:11

How to get all the records from midnight until now in Postgress sql

如何在Postgress sql中从午夜到现在获取所有记录

1 个解决方案

#1


0  

For example:

select * from your_table where date between now()::date and now();

now()::date

will round current timestamp till midnight.

将当前时间戳舍入到午夜。

#1


0  

For example:

select * from your_table where date between now()::date and now();

now()::date

will round current timestamp till midnight.

将当前时间戳舍入到午夜。