Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

1 Year Date Range Formula in Filters

Status
Not open for further replies.

msi30502

Technical User
May 9, 2012
30
US
Hi,
I'm trying to generate a report that tells me all the items each customer purchased in the period of one year. I want to include this in my filter, so that we don't have to manually enter dates in parameters.

Crystal does not give me a pre-defined Function for my purpose. I currently have:

{JrnlHdr.TransactionDate} in LastYearYTD

but, as you can guess it only gives me data for January 2011 through May 2011.

What I really need is to run a report for 365 days through today.

Thanks in advance...
 
Hi msi30502

{JrnlHdr.TransactionDate} > DateAdd("yyyy", -1, CurrentDate) will give you transactions since 16 May 2011.

Regards
Pete
 
Thanks, it worked. I'm guessing that If I wanted to go back only 6 months it would be:

{JrnlHdr.TransactionDate} > DateAdd("MM", -6, CurrentDate)

Is this correct?
 
Did you try it?

Did it give you expected results?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top