Symptom
How to calculate number of particular days for a date field
Environment
Crystal report 2008
Crystal report 2011
Resolution
- Create a sample report which will have a date field
- Create the following formula as {@date} and place it in the details section
DateDiff ( 'ww' , {date field} - 1 , {date field}, 6 ) to have only Fridays
-
Write following formula to know how many Fridays are there for that {date field}
Sum({@date})
The value at the end of the formula for
Sunday-1
Monday-2
Tuesday-3
Wednesday-4
Thursday-5
Friday-6
Saturday-7
Keywords
number of monday, number of particular days in a date field, number of particular week days for a date, number of fridays in crystal 2008, number of particular days in CR 2011 , KBA , BI-RA-CR-DSL , Crystal Reports on C++ Data Semantic Layer (ClassicUniverse) , How To
Product
Crystal Reports 2008 V1 ; SAP Crystal Reports 2011