Solved

Crystal Reports last day of month

Posted on 2016-10-11
2
44 Views
Last Modified: 2016-10-12
I am using this to get the last day of the month
date(year({OPERATION.SCHED_START_DATE}),month({OPERATION.SCHED_START_DATE})+1,1)-1
It works until the OPERATION.SCHED_START_DATE is in December.  Then I get the following:
A month number must be between 1 and 12.
What do I need to change for it to recognize going from December to January?
0
Comment
Question by:slmc
2 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 41839258
Try this

DateAdd('m',1,Date(year({OPERATION.SCHED_START_DATE}),month({OPERATION.SCHED_START_DATE}),1)) -1

Open in new window


mlmcc
0
 

Author Closing Comment

by:slmc
ID: 41840226
That is it.  Thank you.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now