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: utilizing dates

Re: utilizing dates

From: Laly <lalystar_at_free.fr>
Date: Tue, 22 Jul 2003 06:07:33 +0200
Message-ID: <3f1cb87b$0$2184$626a54ce@news.free.fr>


Hello,

I think this is working to get the starting and ending date : SQL> select sysdate,

  2      trunc(trunc(sysdate, 'Q')-1,'Q') start_date,
  3      trunc(sysdate, 'Q')-1 end_date

  4 from dual;

SYSDATE START_DA END_DATE
-------- -------- --------
22/07/03 01/04/03 30/06/03

If you want to automate some more, look at the package DBMS_JOB to launch automatically your batch.

Regards,

Laly.

"Shawn" <spedwards_at_qwest.net> a écrit dans le message de news: cc2Ta.92$ez2.88205_at_news.uswest.net...
> I have a simple script that I was given that I run the first business day
of
> each quarter for the previous quarter. So, for the past year I manually
> pass it a start date and a end date for the previous quarter. So, I ran
it
> on July 1st passing it 01-Apr-03 as the start date and 30-Jun-03 as the
end
> date. It was suggested to me that the script could be automated to
> determine these dates itself since its always run on the first business
day
> of the quarter.
> I'm just not sure where to find this functionality. Any suggestions would
> be greatly appreciated!
>
> Thanks,
> Shawn
>
>
Received on Mon Jul 21 2003 - 23:07:33 CDT

Original text of this message

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