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: Oracle reports

Re: Oracle reports

From: Graham Miller <igor001_at_hotmail.com>
Date: Sat, 20 Feb 1999 13:50:42 GMT
Message-ID: <36cfbceb.23981703@news.u-net.com>


"dredogg" <dredogg_at_bell.net> wrote (in
<7Hiy2.3068$po.1503_at_c01read02.service.talkway.com>)...

| I'm trying to create a report in reports 4.5 that reports on
| six months worth of data. I tried using sysdate - 180 as the
| criteria but this only works if you are at the beginning of a
| month. I need another way to go back six month.
Hi,
 Dates can be truncated....
i.e.
select sysdate,

       trunc(sysdate),
       trunc(SYSDate, 'MONTH'),
       trunc(SYSDate, 'YEAR') 

from dual

gives...
20/02/1999 13:46:16, 20/02/1999, 01/02/1999, 01/01/1999

The 'ADD_MONTHS' function should then give the results you expect.

graham Received on Sat Feb 20 1999 - 07:50:42 CST

Original text of this message

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