Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Calculating the first day of our fiscal year.
Chris <chris.sarka_at_cgi.ca> wrote in article ...
> I'm not too crazy about hard-coding dates into my sql programs. What I
was
> wondering is if anyone has seen or is using an equation that calculates
the
> first day of a certain month(in my case april) and will change
automatically
> when the date passes this date. I also need it to keep last years year
and
> date until this years april 1st date is passed.
> I hope this makes sense
Store the dates in a table ...
FISCAL_YEAR number(4) not null,
START_DATE date,
END_DATE date
Make FISCAL_YEAR a primary key.
Chris