Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 123
  • Last Modified:

Crystal Reports last day of month

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
slmc
Asked:
slmc
1 Solution
 
mlmccCommented:
Try this

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

Open in new window


mlmcc
0
 
slmcAuthor Commented:
That is it.  Thank you.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now