SAP Knowledge Base Article - Public

1544015 - How to extract specific day of a month in Crystal Reports?


  • Need to create a report to return the Specific day of the month.


  • Crystal Reports 2008


  1. The best way would be to find the first Wednesday of the month and add 14 to that date.(Note : Instead of Wednesday you can take any day)
  2. Using the below mentioned formula, we can extract the first Wednesday.
    1. DateVar MonthStart;
      DateVar FirstWed;
      DateVar ThirdWed;
      MonthStart := Date (Year (Today), Month (Today), 1);
      DayOfWeek (MonthStart);
      If DayOfWeek (MonthStart) = 4 Then //[Note: Here 4 indicates Wednesday, so monday=1,Tuesday=2 and so on]
          ThirdWed := DateAdd ("d", 14, MonthStart)
      Else If DayOfWeek (MonthStart) > 4 Then
              (FirstWed := DateAdd ("d", (8 - Day (MonthStart)), MonthStart);
               ThirdWed := DateAdd ("d", 14, FirstWed););


Specific day of a month, Formula in Crystal Reports , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To


Crystal Reports 2008 V1