Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula Help Post Reply Post New Topic
Author Message
nitrotech
Groupie
Groupie


Joined: 30 Jan 2013
Location: United States
Online Status: Offline
Posts: 42
Quote nitrotech Replybullet Topic: Formula Help
     Posted: 12 Mar 2013 at 4:53am
I want a formula that takes the current year and subtracts one year so I can compare wages from the time period.
 
thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Mar 2013 at 5:12am
dateadd('yyyy',-1,currentdate)
IP IP Logged
nitrotech
Groupie
Groupie


Joined: 30 Jan 2013
Location: United States
Online Status: Offline
Posts: 42
Quote nitrotech Replybullet Posted: 12 Mar 2013 at 5:34am
What if I want to do for example a pay period for example compare
2-1-2012 to 2-15-2012
to 2-1-2013 to 2-15-2013
Thanks
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Mar 2013 at 6:03am
how are you getting the current dates? Run time parameters? from your dataset? somewhere else?
IP IP Logged
nitrotech
Groupie
Groupie


Joined: 30 Jan 2013
Location: United States
Online Status: Offline
Posts: 42
Quote nitrotech Replybullet Posted: 12 Mar 2013 at 11:10am
from the dateset just need to have same pay periods line up
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Mar 2013 at 11:36am

I still am not sure how you are telling the report to grab the 2013 dates?

IP IP Logged
joeg1962
Newbie
Newbie


Joined: 01 Mar 2013
Location: United States
Online Status: Offline
Posts: 35
Quote joeg1962 Replybullet Posted: 13 Mar 2013 at 3:06am
How will you know any two week period?
In other words, today is 3/13/2013, so are we in
    3/3/13 - 3/16/13 (assuming Sunday-Saturday) or
    3/10/13 - 3/23/13
Once you know this, you could
    Loop 26 times to step back 14 days at a time
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