Hi
If you need to account for daylight savings, you could use the following
SQL query to detect the same

select SYSDATE x, 0 r1 from dual where SYSDATE between (select
decode(to_char(to_date('04/01/2003','MM/DD/YYYY'),'D'),1,
to_date('04/01/2003','MM/DD/YYYY')+7, 2,
to_date('04/01/2003','MM/DD/YYYY')+6, 3,
to_date('04/01/2003','MM/DD/YYYY')+5, 4,
to_date('04/01/2003','MM/DD/YYYY')+4, 5,
to_date('04/01/2003','MM/DD/YYYY')+3, 6,
to_date('04/01/2003','MM/DD/YYYY')+2,
to_date('04/01/2003','MM/DD/YYYY')) sday1 from dual) and (select
decode(to_char(to_date('09/01/2003','MM/DD/YYYY'),'D'),1,
to_date('09/01/2003','MM/DD/YYYY')+7, 2,
to_date('09/01/2003','MM/DD/YYYY')+6, 3,
to_date('09/01/2003','MM/DD/YYYY')+5, 4,
to_date('09/01/2003','MM/DD/YYYY')+4, 5,
to_date('09/01/2003','MM/DD/YYYY')+3, 6,
to_date('09/01/2003','MM/DD/YYYY')+2,
to_date('09/01/2003','MM/DD/YYYY')) sday2 from dual);

--
Posted via [url]http://dbforums.com[/url]