Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

week of the year

Status
Not open for further replies.

OT2

Technical User
Jan 14, 2005
54
US
Hello, I am using CR9 and was wondering if there was a function I can use to convert a WeekofYear value into a date range, for example if my WeekofYear value is 23 I would like to see:

Week of 06/05/2005 - 06/11/2005


Thank you for you help

 
What rule are you using to determine what is the first week of the year? The first fullweek, the first week containing Jan 1, the first week with four days, or what?

-LB
 
Hi lbass, our first week of the year is considered to be 01/01/05, second week starts from 01/02/05 to 01/08/05. Hope this helps, thanks - OT2
 
Try:

"Week of "+totext(dateadd("ww",{@weekofyear}-1,date(2005,01,01)-dayofweek(date(2005,01,01))+1),"MM/dd/yyyy") +" to "+
totext(dateadd("ww",{@weekofyear},date(2005,01,01)-dayofweek(date(2005,01,01))),"MM/dd/yyyy")

Substitute your WeekofYear for {@WeekofYear}. Please note that I believe the currentweek is week 24.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top