SAP Knowledge Base Article - Public

1701445 - How to calculate number of particular days for a date field

Symptom

How to calculate number of particular days for a date field

Environment

Crystal report 2008

Crystal report 2011

Resolution

  1. Create a sample report which will have a date field
  2. 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

  1. 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