Message-Id: <10701.123714@fatcity.com> From: Dara Vaughn Date: Tue, 05 Dec 2000 13:38:53 -0600 Subject: RE: REVIEWED: group by week This is a multi-part message in MIME format. --Boundary_(ID_f0GePPJfYbubJH/8taGujw) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit Andrey, Try this: select trunc(to_date(to_char( &week_of_year * 7) || '/' || to_char(sysdate,'YYYY'),'DDD/YYYY'),'IW')-1 from dual; Modify accordingly! Dara Vaughn Oracle DBA Quality Software Engineering -----Original Message----- From: root@fatcity.com [mailto:root@fatcity.com]On Behalf Of andrey Sent: Tuesday, December 05, 2000 12:37 PM To: Multiple recipients of list ORACLE-L Subject: REVIEWED: group by week Dear list ! Is there a function which converts a week number into a date of the first day of the week ? For example , this week is week number 49 in the year 2000 . I need a function that will give me '03-DEC-2000' ( last sunday ) as an output . Thanks a lot ! Andrey . --Boundary_(ID_f0GePPJfYbubJH/8taGujw) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: quoted-printable
Andrey,
 
Try=20 this:
 
select=20 trunc(to_date(to_char( &week_of_year * 7) || '/' ||=20 to_char(sysdate,'YYYY'),'DDD/YYYY'),'IW')-1
from    = dual;
 
Modify=20 accordingly!
 
Dara=20 Vaughn
Oracle=20 DBA
Quality Software = Engineering
-----Original Message-----
From: root@fatcity.com=20 [mailto:root@fatcity.com]On Behalf Of andrey
Sent: = Tuesday,=20 December 05, 2000 12:37 PM
To: Multiple recipients of list=20 ORACLE-L
Subject: REVIEWED: group by = week


Dear list !
 
Is=20 there a function which converts a week number into a date of the = first day=20 of the week ?
For example , this week is week number 49 = in the=20 year 2000 .
I=20 need a function that will give me '03-DEC-2000'  ( last sunday = ) as an=20 output .
 
Thanks a lot !
 
Andrey=20