现在的位置: 首页 > 综合 > 正文

postgreSQL中查找日期

2014年02月12日 ⁄ 综合 ⁄ 共 228字 ⁄ 字号 评论关闭

要查找项目里某个日期的里对应的记录,发现有下面的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'

【上篇】
【下篇】

抱歉!评论已关闭.