Week number in Crystal reports

I need to calculate the week number that we are currently in for a crystal report from a given date.
ross13Asked:
Who is Participating?
 
delindCommented:
According to According to ISO 8601 the week starts on Monday, so the formula should be:

DatePart("ww",{Table.DateField},crMonday,crFirstFourDays)

In CR 11.0.0.1994 (and maybe later versions too) I discoverd a bug in this function for the dates 1-1-2010 until 3-1-2010. The function returns 9652 or 9653 instead of 53 !!

To workaround this bug use the formula:

IIF( DatePart("ww",{Table.DateField},crMonday,crFirstFourDays) > 53, 53,   DatePart("ww",{Table.DateField},crMonday,crFirstFourDays))
0
All Courses

From novice to tech pro — start learning today.