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.
Who is Participating?
According to According to ISO 8601 the week starts on Monday, so the formula should be:


In CR (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))
All Courses

From novice to tech pro — start learning today.