Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Date Range - Previous 7 Days Post Reply Post New Topic
Author Message
GPDJJ
Newbie
Newbie


Joined: 07 May 2018
Online Status: Offline
Posts: 6
Quote GPDJJ Replybullet Topic: Date Range - Previous 7 Days
    Posted: 23 May 2019 at 2:25am
I am looking to create a formula that calculates the previous seven days from midnight to midnight regardless of when I run the report on the eighth day. As of now I use this formula but it runs the previous seven days from the time I run it on the eighth day. I specifically need the the previous seven days from midnight to midnight. Thank you.

datediff('d',{lwmain.dtrepor},currentdate)<8

Edited by GPDJJ - 23 May 2019 at 2:25am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 May 2019 at 7:44am
datediff('d',{lwmain.dtrepor},currentdate) in 1 to 8
IP IP Logged
GPDJJ
Newbie
Newbie


Joined: 07 May 2018
Online Status: Offline
Posts: 6
Quote GPDJJ Replybullet Posted: 23 May 2019 at 10:24am
Thanks! I was able to figure it out using a different method but it worked. I will archive your formula as well for reference.
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.