现有一个字段TIME,格式为date,样式为:2014-11-27 10:30:36
现在有另一张表和它关联,需要判断前一天时间内的明细,类似于2014-11-26 00:00:00 ~ 2014-11-26- 23:59:59
请问这个字段该如何判断?
Ex:
select * from table where TIME >= :1 and TIME <= :2
谢谢
------解决思路----------------------
select * from table
where TIME >=to_date('2014-11-26 00:00:00','yyyy-mm-dd hh24:mi:ss')
and TIME <=to_date('2014-11-26 23:59:59','yyyy-mm-dd hh24:mi:ss')