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


Joined: 03 Apr 2016
Online Status: Offline
Posts: 31
Quote bjfils Replybullet Topic: Date Range
    Posted: 12 May 2021 at 4:43am
I have a report that runs once a month using the LastFullMonth parameter. I've been asked to run this report for a number of years, but can't figure out how to create a formula for essentially from 01/01/2018 through 04/30/2021. It's probably a simple thing that I'm overthinking.

I freely admit I'm self taught on only the basics of CR. Thanks!

Edited by bjfils - 12 May 2021 at 4:44am
IP IP Logged
bjfils
Newbie
Newbie


Joined: 03 Apr 2016
Online Status: Offline
Posts: 31
Quote bjfils Replybullet Posted: 12 May 2021 at 7:46am
I kept digging and found a formula that works:

{ticket.dateshipped} >=date(2018,01,01) and
{ticket.dateshipped} <=date(2021,04,30)

I was trying to have them be one line and use "between" or something like that.

I first entered the date as 01/01/2018 and it returned all dates, including those before 01/01/2018. Changing the formatting to 2018,01,01 fixed that.

Edited by bjfils - 12 May 2021 at 7:57am
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 13 May 2021 at 4:39am
Also you can do something like this:

{ticket.dateshipped}in date(2018,01,01) to date(2021,04,03).  But in the end, the sql probably will evaluate to the same code.
IP IP Logged
bjfils
Newbie
Newbie


Joined: 03 Apr 2016
Online Status: Offline
Posts: 31
Quote bjfils Replybullet Posted: 13 May 2021 at 5:39am
Thanks for another option!
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.