AppDate Between to_date('2011-08-09','yyyy-mm-dd') And to_date('2011-08-30','yyyy-mm-dd'),明明appdate是‘2011-8-30’,为啥就查不出数据呢?换成>=、<=还是不行

解决方案 »

  1.   

    --试一下:AppDate Between to_char('2011-08-09','yyyy-mm-dd') And to_char('2011-08-30','yyyy-mm-dd')
      

  2.   

    appdate 是日期类型,你要看一下它是否还包含了小时,分秒 to_char(appdate,'yyyy-mm-dd hh24:mi:ss')to_date('2011-08-30','yyyy-mm-dd') 相当于是 30 号这一天的 0 点
      

  3.   

    HR > select  to_date('2011-08-30','yyyy-mm-dd') from dual;TO_DATE('2011-08-30
    -------------------
    2011-08-30 00:00:00
      

  4.   

    --对不起,用这个:where to_char(AppDate,'yyyymmdd') Between 20110809 And 20110830;
      

  5.   

    AppDate Between to_date('2011-08-09 00:00:00','yyyy-mm-dd hh24:mi:ss') And to_date('2011-08-30 23:59:59','yyyy-mm-ddhh24:mi:ss')
      

  6.   

    appdate=‘30-8月 -11 02.14.28.000000 下午’
      

  7.   

    AppDate>=to_date('2011-08-09','yyyy-mm-dd') and AppDate<to_date('2011-08-31','yyyy-mm-dd');
      

  8.   

    你把 appdate between to_date('2011-08-09 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2011-08-30 23:59:59','yyyy-mm-dd hh24:mi:ss')