hh:mm:ss
==>
hh:mi:ssto_date('2002-01-01 12:00:00','yyyy-mm-dd hh:mi:ss')

解决方案 »

  1.   

    select * from table where theday=to_date('2002-1-1 12:00:00','yyyy-mm-dd hh24:mi:ss')
      

  2.   

    必须将字符串改为日起类型
    select * from talbe where theday=to_date('2002-1-1 12:00:12','yyyy-mm-dd hh24:mi:ss')24表示为24小时制
    mi(分)避免和mm(月)重复
      

  3.   

    好像差不出来,不知怎么回事
    数据库表中有AM、PM,会不会有关系?
      

  4.   

    saucer(思归, MS .NET MVP) ,你真牛比啊,五颗星。哪个板块的啊?
      

  5.   

    SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss am') from dual;TO_CHAR(SYSDATE,'YYYY-MM-DDHH2
    ------------------------------
    2003-02-23 12:13:49 下午select * from talbe where to_char(theday,'yyyy-mm-dd hh24:mi:ss am')='2002-1-1 12:00:12 下午'
      

  6.   

    select * from talbe where to_char(theday,'yyyy-mm-dd hh24:mi:ss am')='2002-1-1 12:00:12 下午'hh24---下午:如果24表示为24小时制,那么上、下午就不可以了!