Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: first and last day of last month Post Reply Post New Topic
Author Message
Macavity
Groupie
Groupie


Joined: 24 Sep 2012
Online Status: Offline
Posts: 93
Quote Macavity Replybullet Topic: first and last day of last month
    Posted: 23 Jan 2014 at 6:03am
Hi,

I have been changing a bunch of reports to get data from last month

formula:

@firstdaylastmonth : dateserial(year(currentdate),month(currentdate)-1,1)

@lastdaylastmonth : date(year(currentdate),month(currentdate,1)-1

Works perfect in the first ten reports, in the eleventh report :
firstdaylastmonth = 01/05/2006 and lastdaylastmonth = 31/05/2006

?????????

How does that happen ?

thanks

IP IP Logged
lolly54
Groupie
Groupie
Avatar

Joined: 25 Sep 2011
Online Status: Offline
Posts: 58
Quote lolly54 Replybullet Posted: 27 Jan 2014 at 3:48am
If you want to get data from last month, why don't you use lastFullMonth?
Then, you wouldn't need to have the additional two formulas.

In selection criteria:

{@Open Date} in lastFullMonth
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.