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: Trick query to return week ending date

Re: Trick query to return week ending date

From: Steve Halko <steveh_at_redshift.com>
Date: Tue, 20 Apr 1999 21:04:32 -0700
Message-ID: <7fjmd3$jqv$1@remarQ.com>


PROCEDURE get_dates IS

--Initialize date to Sunday 6 months ago (183 days) the_date DATE := NEXT_DAY(TRUNC(SYSDATE-183),'SUNDAY');

begin

   LOOP

        EXIT WHEN the_date > SYSDATE;
        the_date := the_date + 7;   --Increment date by a week to get
another sunday
       --Do whatever you need to do with the_date here
   END LOOP;
end;

PGunda <pgunda_at_aol.com> wrote in message news:19990416195353.09333.00001693_at_ng12.aol.com...
> I have a situation where I need to populate a list item with week ending
date (
> sunday) for the past 6 months so that the user can pick a value.
>
> By the way I want to implement it in WEB development using PL/SQL
catridge.
> If any one has a solution for this, please reply.
>
> Thanks in advance for your feedback.
> Raj
>
Received on Tue Apr 20 1999 - 23:04:32 CDT

Original text of this message

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