Calculate date from week of year, or week to date
Useful solution for finding the date of first day of a given week, and year.
select decode(to_Char(to_date(’01-JAN-‘||&Cur_year),’DY’),’MON’, to_date(’01-JAN-‘||&Cur_year),next_day(to_date(’01-JAN-‘||&Cur_year),’MON’))+(7*(&cur_week-1)) from dual
Value of Cur_year may be any year and Cur_week must be between 1-52.
Recent Comments