Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trick query to return week ending date
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 hereEND LOOP;
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
![]() |
![]() |