Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Leap Year Post Reply Post New Topic
Author Message
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Topic: Leap Year
     Posted: 27 Mar 2012 at 3:30am
I have a report that currently has the formula
({SO_03SOHistoryHeader.OrderDate})<=({@ReportEndDate})-365

The issue that I have is that with leap year it is grabbing an extra day.  Is there a formula that I can work around this?  or am I going to have to change it to -366 days just for the report for this year?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Mar 2012 at 3:37am
({SO_03SOHistoryHeader.OrderDate})<=(dateadd('yyyy',-1{@ReportEndDate})
IP IP Logged
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Posted: 27 Mar 2012 at 4:00am
Worked perfectly - thank you!!
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