where x > sysdate - 18/24
hth
connor
- Johan Muller <c-johan.muller_at_wcom.com> wrote: > I
need a where clause to ACCURATELY (down to the
> second) calculate the
> previous 24 hours when a query is run and bump the
> time by 6 hours
> (event_date is based on GMT). The default date
> format has been set to
> 'SYYYY-MM-DD HH24:MI:SS','NLS_CALENDAR=GREGORIAN'.
>
> I've tried the following:
>
> " where event_date >
> (to_date(substr(sysdate,0,22),'YYYY/MM/DD
> HH24:MI:SS')
> + 6/24) - 1".
>
> Any ideas?
>
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author: Johan Muller
> INET: c-johan.muller_at_wcom.com
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)
"Some days you're the pigeon, some days you're the statue"
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: =?iso-8859-1?q?Connor=20McDonald?=
INET: hamcdc_at_yahoo.co.uk
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Tue Apr 09 2002 - 07:53:24 CDT