Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Problem comparing dates

Problem comparing dates

From: Rhugga <chuck.carson_at_gmail.com>
Date: 21 Jul 2005 13:04:18 -0700
Message-ID: <1121976258.942865.38070@g47g2000cwa.googlegroups.com>


I amtrying to select rows that fit a certain time period.

My table:
BCV_START DATE

COL1         VARCAHR2
COL2         VARCAHR2

My data is inserted as follows:

INSERT INTO MYTABLE VALUES ( to_date('2005-07-20 16:30:00', 'YYYY-MM-DD HH24:MI:SS', 'data', 'data')

The following query is not behaving as expected:

SELECT * FROM MYTABLE where to_date(bcv_start, 'DD-MON-YYYY HH24:MI') > to_date('20-JUL-2005 01:00', 'DD-MON-YYYY HH24:MI') AND to_date(bcv_start, 'DD-MON-YYYY HH24:MI') < to_date('20-JUL-2005 17:00', 'DD-MON-YYYY HH24:MI') What am I doing wrong here?

Thx,
CC Received on Thu Jul 21 2005 - 15:04:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US