Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Last 2 months to current date Post Reply Post New Topic
Author Message
rbescos
Newbie
Newbie


Joined: 10 Aug 2010
Location: United States
Online Status: Offline
Posts: 13
Quote rbescos Replybullet Topic: Last 2 months to current date
    Posted: 12 Jan 2011 at 11:53am
How can I take this back to include the last 2 months instead of current month to date?
 

month({BM_LO.Est Closing Dt}) = month(currentdate) and

year({BM_LO.Est Closing Dt}) =year(currentdate)

Thank you in advance.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jan 2011 at 4:07am
depends on if you want the first of the month or two months from today
 
2 months from today
{BM_LO.Est Closing Dt} in dateadd('m',-2,currentdate) to currentdate
 
2 months from the first of the month
{BM_LO.Est Closing Dt} in dateserial(year(currentdate),month(currentdate)-2,1) to currentdate
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.