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: Date problem in sql forms4.5???

Re: Date problem in sql forms4.5???

From: Eric Lyders-Gustafson <ericlg_at_homemail.com>
Date: Tue, 19 May 1998 12:26:12 -0500
Message-ID: <3561C0B3.1B3BBCBA@homemail.com>


I had the same puzzle awhile ago. The solution is rather crude, but works.

select (trunc(sysdate,'DAY')+1) - (7*rownum) from <table_name>
where rownum between 1 and 5;

The <table_name> can be any table that will have at least 5 rows in it, preferably a small table so it's fast.

Hope this helps.
-Eric

Dee wrote:

> Hi,
> I have following table
>
> WTS
> empName varchar2(10),
> Weekstart date,
> wdate date,
> Hours number(2);
>
> This form is developed for employees to fill weekly time sheets. Now, I want
> that weekstart shows a day which is monday. In my Lov I want to store at
> lease four previous mondays from the current date. Like today is may 7,1998.
> I want that this feild store
> May,4,1998
> april 13,1998
> april 20,1998
> April,27,1998
>
> If current date is say 30 may,1998, this lov should store May,25,18,11,4.
>
> How can I do this.
> please suggest.
> Thanks
> Dee
Received on Tue May 19 1998 - 12:26:12 CDT

Original text of this message

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