postgreSQL中查找日期

来源:互联网 发布:求三唑仑淘宝上输什么 编辑:程序博客网 时间:2024/05/17 23:58

要查找项目里某个日期的里对应的记录,发现有下面的sql语句:

select * from t_appointment where to_char(appointment_time,'yyyy-mm-dd') like '2013-04-19%'

或者select * from t_appointment where appointment_time>='2013-04-19 00:00:00.0' and appointment_time<='2013-04-19 23:59:59.9'

原创粉丝点击