Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Excellence can be obtained if you care more than others think is wise, risk more than others think is safe, dream more than others think is practical, expect more than others think is possible
 
Unknown
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

29
November

How do I Calculate the Current month Start and End Dates in Crystal Reports?

A client recently asked me "How do I calculate the start and end date of the current month in Crystal Reports?"

To calculate the start and end dates of the current month, one can use the following formula:

Numbervar CurrentMonth := Month(CurrentDate);

Numbervar CurrentYear := Year(CurrentDate);

Datevar MonthStart;

Datevar MonthEnd;

MonthStart := Date(CurrentYear, CurrentMonth, 1);


MonthEnd := Date(CurrentYear, CurrentMonth, 1) -1;


"From " & MonthStart &" to "& MonthEnd

MAKE A COMMENT

Name *

Email Address *

Comment *