Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle reports
"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')
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
![]() |
![]() |