Archive

Posts Tagged ‘week to date’

Calculate date from week of year, or week to date

November 12, 2007 Leave a comment

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.

Thank you Sandy for this solution.  

Julian Dontcheff's Database Blog

Distinguished Product Manager - PL/SQL and JSON at Oracle

Bobby Durrett's DBA Blog

Oracle database performance

flashdba

Database Performance in the Cloud

Don Charisma

because anything is possible with Charisma

Carol no Mundo!

Aventuras de uma intercambista a trabalho pelo mundo!

nimaidba

Welcome to the world of Oracle with me....

Tech

News and reviews from the world of gadgets, gear, apps and the web

WordPress.com

WordPress.com is the best place for your personal blog or business site.

Gurcan Orhan's ODI and DWH Blog

Some words about Oracle Data Integrator and Data Warehousing.