Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Date in SQL
select *
from mytable
where date_col = sysdate - 15;
Marien Kaptein wrote:
> Hi all,
>
> I have a table with a date field. From this table I want to list all records
> of which the date is 15 days old, thus the date in the table must be 15 days
> before sysdate.
>
> I have tried something with adding days to the day-number and compare this
> with last_day. But this gets to complex because you must also account for
> situations where you cross months and years.
>
> Has anyone any idears?
>
> Thanx in advance
> Marien Kaptein
Received on Wed Jul 28 1999 - 06:59:27 CDT