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 -> Re: Difference between SYSDATE and TO_DATE

Re: Difference between SYSDATE and TO_DATE

From: lnvu <member45846_at_dbforums.com>
Date: Wed, 29 Oct 2003 17:03:44 -0500
Message-ID: <3538189.1067465024@dbforums.com>

Tom,

You need to be careful when working with date and remember that the date functions are available so use them when needed. Also when using the date range, allways go from older-date to newer-date not the other way around like you had, so try this instead:

SELECT Count(*)

   FROM EVENTSTREAM  WHERE TYPE = 11     AND (TS BETWEEN to_char(sysdate -1, 'DD-MON-YY') AND

    to_char(sysdate, 'DD-MON-YY'));

Linh

--
Posted via http://dbforums.com
Received on Wed Oct 29 2003 - 16:03:44 CST

Original text of this message

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