Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: How do you hard code current month & next month? Post Reply Post New Topic
Author Message
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Topic: How do you hard code current month & next month?
     Posted: 26 Sep 2011 at 8:33am
Hello everyone,
 
I have a report that I've built with begin and end date parameters.  Now, my end user would like the report to be run with the begin date of the current month and date of the 14th and the end date to be next month and date of the 16th.  Is this possible in Crystal?
 
Thank you in advance.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Sep 2011 at 9:15am
date(year(currentdate),month(currentdate),14) to dateserial(year(currentdate),month(currentdate)+1,16)
IP IP Logged
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Posted: 27 Sep 2011 at 4:58am

YOU ROCK!!!!!!!!!!!

I do have a question for you.  I have a field, {pc_renew;1.EFF_START_DT}, with the date and seconds included.  So, it would look like:
09/27/2011 12:00:00AM.  Is there a way to use this field with this formula?
 
Thank you in advance.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Sep 2011 at 5:04am
I am assuming you want to compare it to see if it falls in the range. You can use it and it ignores the time value (midnight)
 
{pc_renew;1.EFF_START_DT} in date(year(currentdate),month(currentdate),14) to dateserial(year(currentdate),month(currentdate)+1,16)
IP IP Logged
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Posted: 28 Sep 2011 at 6:11am
Thank you again.  You are the best!!!!!
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum