Feb 9, 2009 #1 nickloe IS-IT--Management Joined Feb 9, 2009 Messages 6 Location US In one of my reports I need to base a calculation on what week it is of the year. For example, Feb 9 - 13 is the 6th full week of the year. Does anyone know how to get this calculation? Thanks!! Nick
In one of my reports I need to base a calculation on what week it is of the year. For example, Feb 9 - 13 is the 6th full week of the year. Does anyone know how to get this calculation? Thanks!! Nick
Feb 10, 2009 #2 IanWaterman Programmer Joined Jun 26, 2002 Messages 3,511 Location GB Use Crystal function datepart datepart("ww", {datefield}) This will return week number of year. Ian Upvote 0 Downvote
Feb 10, 2009 #3 lbass Technical User Joined Feb 9, 2002 Messages 32,818 Location US I think you would have to add the FirstDayofWeek and FirstWeekofYear arguments: datepart("ww",currentdate,crSunday,crFirstFullWeek) Note that to use FirstWeekofYear argument correctly, you have to also specify the FirstDayofWeek. -LB Upvote 0 Downvote
I think you would have to add the FirstDayofWeek and FirstWeekofYear arguments: datepart("ww",currentdate,crSunday,crFirstFullWeek) Note that to use FirstWeekofYear argument correctly, you have to also specify the FirstDayofWeek. -LB