Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Last 365 days formula help Post Reply Post New Topic
Author Message
Beso90
Groupie
Groupie
Avatar

Joined: 12 Jun 2014
Location: United States
Online Status: Offline
Posts: 48
Quote Beso90 Replybullet Topic: Last 365 days formula help
    Posted: 03 Jan 2018 at 6:17am
Hello,

I'm using Crystal Reports 2013 Support Pack 1
Version 14.1.1.1036

Last year I had a formula that worked perfectly for us. which is:

{@prod date} = (yeartodate)

but since we're in January now, the report is bringing very little data back since we're still in the 3rd day.

What I need is a formula that always looks at the last 365 days to current date or to current date -1.

Thank you,

Basel.
IP IP Logged
Beso90
Groupie
Groupie
Avatar

Joined: 12 Jun 2014
Location: United States
Online Status: Offline
Posts: 48
Quote Beso90 Replybullet Posted: 03 Jan 2018 at 6:31am
Sorry I jumped into asking right away.
I figured it out.
if you're curious:
({@prod date} in (currentdate-365) to (currentdate-1))
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 11 Jan 2018 at 11:47am
you could also probably use something like:
{@prod date}>dateadd("y",-1,today)

probably a host of other ways as well
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.017 seconds.