Solved

Crystal Reports last day of month

Posted on 2016-10-11
2
61 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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 …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

828 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