Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Date Range Post Reply Post New Topic
Author Message
arhea
Newbie
Newbie


Joined: 17 Dec 2009
Location: United States
Online Status: Offline
Posts: 2
Quote arhea Replybullet Topic: Date Range
     Posted: 17 Dec 2009 at 7:16am
I am using Crystal XI R2 and I need to pull date range first day of last month through current date.  Does anyone know the code for this?  I have tried several params but none worked.  Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Dec 2009 at 7:31am
an option:
{table.date} in dateadd('m',-1,dateadd('d',-day(currentdate)+1,currentdate)) to currentdate
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 17 Dec 2009 at 7:36am
Hi Create Formula use the code below
 
DATESERIAL((DATEPART("YYYY",CurrentDate)), DATEPART("m",CurrentDate)-1,1)
 
then in record selection check the date field against the formula
 
cheers
Rahul


Edited by rahulwalawalkar - 17 Dec 2009 at 7:37am
IP IP Logged
arhea
Newbie
Newbie


Joined: 17 Dec 2009
Location: United States
Online Status: Offline
Posts: 2
Quote arhea Replybullet Posted: 18 Dec 2009 at 11:12am
Thank you so much. Worked like a charm.
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