The easiest solution is to do a lookup against your company's calendar dimension table.
Beyond that, you'll have to define exactly what a week means to your business and create transformation rules as required:
For example:
What day starts your week?
Does week one always include 7 days?
Does the first full week of the quarter constitute week one?
Is the first day of the quarter always in week one?
etc.
etc.
Where are you going to put weeks 49 through 53? You need to think more carefully about your business rules. How is week #1 in any year defined? Is it necessary that every week has 7 days? (It should be, if you're planning to summarize/aggregate by week.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Actuly In week either 7 days or 5 days, But i need to get total calendar weeks in a quarter let us say 1 to 12 for each quarter.and restart count if month jan,april,july and october.
There are usually 13 weeks in a quarter, but it still depends on how you define "week". I can not stress how important it is to get this (business rule) right.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I agree with Mike, in most of the cases there is always a calendar table defined for business related queries. You can simply fetch the records from that table joining on the date, this way you'll not need to define the business rule again.