Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SELECT BETWEEN Dates
Try ....WHERE TRUNC(REV_DATE) BETWEEN... - the time element in the dates is
confusing the results.
Eamonn Keating wrote in message <7os1ab$qng$1_at_scotty.tinet.ie>...
>On the oracle database the following statement will not retrieve any rows
>SELECT PartCode,SPEC_REV_NO, to_char(CHANGE_DATE_TIME,'dd/Mon/yyyy
>hh24:mi:ss'), to_char(REV_DATE,'dd/Mon/yyyy'),Userid,Comments FROM SPECAUD
>WHERE REV_DATE BETWEEN to_date( '11-Aug-1999' , 'dd-mon-yyyy') AND
>o_date( '11-Aug-1999' , 'dd-mon-yyyy')
>
>wheras the following will
>
>SELECT PartCode,SPEC_REV_NO, to_char(CHANGE_DATE_TIME,'dd/Mon/yyyy
>hh24:mi:ss'), to_char(REV_DATE,'dd/Mon/yyyy'),Userid,Comments FROM SPECAUD
>WHERE REV_DATE BETWEEN to_date( '11-Aug-1999' , 'dd-mon-yyyy') AND
>o_date( '12-Aug-1999' , 'dd-mon-yyyy')
>
>for data on 11-Aug-1999 ?
>any help would be appreciated
>
>Regards
>Eamonn
>
>
Received on Wed Aug 11 1999 - 09:47:39 CDT
![]() |
![]() |