Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Be humble and polite, but don't let anyone push you around
 
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 *

To prove you are human what is:

12 + 77 =