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 -> 2000 Date problem?

2000 Date problem?

From: Douglas Whitacre <whitacre_at_imake.com>
Date: Tue, 09 Nov 1999 18:28:33 GMT
Message-ID: <lJZV3.1737$K5.261055@typhoon2.gnilink.net>


I have a record with Start Date & End Date. Record in the database are:

contentId startDate endDate

--------- ------------------- -------------------
       73 03/01/2000 00:00:00 03/31/2000 23:59:59
       73 03/01/2000 00:00:00 03/31/2000 23:59:59

when I run the following query it returns NO rows:

SELECT content_id "contentId",

       to_char(start_date, 'MM/DD/YYYY HH24:MI:SS') "startDate",
       to_char(end_Date,'MM/DD/YYYY HH24:MI:SS') "endDate"
FROM x
WHERE (x_id = 3)
AND (start_date <= to_date('03/31/2000 23:59:59', 'MM/DD/YYYY HH24:MI:SS'))
AND (end_date >= to_date('03/01/2000 00:00:00', 'MM/DD/YYYY HH24:MI:SS')) ORDER BY content_id, start_date

However, when I run the following query it returns both rows (using 12/31/1999 as end date comparison):

SELECT content_id "contentId",

       to_char(start_date, 'MM/DD/YYYY HH24:MI:SS') "startDate",
       to_char(end_Date,'MM/DD/YYYY HH24:MI:SS') "endDate"
FROM media_nvod_dates
WHERE (nvod_id = 3)
AND (start_date <= to_date('03/31/2000 23:59:59', 'MM/DD/YYYY HH24:MI:SS'))
AND (end_date >= to_date('12/31/1999 00:00:00', 'MM/DD/YYYY HH24:MI:SS')) ORDER BY 2,3 Anyone have similar problems? Received on Tue Nov 09 1999 - 12:28:33 CST

Original text of this message

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