以下是我要解决的实际问题.
我要从ORACLE中的一张表上读出数据.这张表有一列是Date类型.我需要将时间处在指定范围内的数据读出来.
System.Data.OracleClient.OracleDataAdapter ora_adp = 
         new System.Data.OracleClient.OracleAdapter("select * from main where time ... ...",oracleConnection1);
请大家指点.

解决方案 »

  1.   

    你平时怎么写语句查询 oracel 的就怎么写了
      

  2.   

    new System.Data.OracleClient.OracleAdapter("select * from main where time ... ...",oracleConnection1);用between and 就可以阿
      

  3.   

    http://www.techonthenet.com/oracle/functions/to_char.htmto_char (sysdate, 'yyyy/mm/dd'); would return '2003/07/09' 
    to_char (sysdate, 'Month DD, YYYY'); would return 'July 09, 2003' 
    to_char (sysdate, 'FMMonth DD, YYYY'); would return 'July 9, 2003' 
    to_char (sysdate, 'MON DDth, YYYY'); would return 'JUL 09TH, 2003' 
    to_char (sysdate, 'FMMON DDth, YYYY'); would return 'JUL 9TH, 2003' 
    to_char (sysdate, 'FMMon ddth, YYYY'); would return 'Jul 9th, 2003' 
      

  4.   

    also, you can tryto_date ('2003/07/09', 'yyyy/mm/dd'); would return a date value of July 9, 2003. 
    to_date ('070903', 'MMDDYY'); would return a date value of July 9, 2003. 
    to_date ('20020315', 'yyyymmdd'); would return a date value of Mar 15, 2002. 
      

  5.   

    select * from main where time between to_date('2000-06-20','yyyy-mm-dd') and to_date('2000-06-17','yyyy-mm-dd')
    是这样吗?怎么查出来的结果不对呢?