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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Dating!

Re: Dating!

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Mon, 19 Jul 1999 21:46:49 +0800
Message-ID: <37932C49.230D@yahoo.com>


Allan Saadbye wrote:
>
> Dear usergroup,
>
> I've a little performence problem, concerning date formats and performance.
>
> My simple question is how and where to run a little routine like :
>
> sql>Select
> to_date(rpad(to_char(sysdate-1,'ddmmyyyy'),12,'0800'),ddmmyyyyhh24mi') from
> dual;
>
> The point is to get data from an undefined starting point and getting data
> collected by the last 24 hoursgg uding either unix or sql.
>
> Please reply !

select *
from my_table
where my_date_column < sysdate - 1

will return data in the last 24 hours from the current moment...

select *
from my_table
where my_date_column < trunc(sysdate)

will return data for all of "yesterday"

HTH --



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Mon Jul 19 1999 - 08:46:49 CDT

Original text of this message

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