Friday, March 19, 2010

Query to calculate week number from a given date taking monday as first date of week in pl sql

Here is the Query to calculate week number from a given date taking monday as first date of week in pl sql.

SELECT ceil(( 7+(trunc(to_date('01-Jan-2009'),'d')-trunc(to_date('01-Jan-2009'),'Y')) )/7) FROM dual

No comments: