Print Page | Close Window

Date range in selection formula not working

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22839
Printed Date: 29 Apr 2024 at 1:17am


Topic: Date range in selection formula not working
Posted By: Michele
Subject: Date range in selection formula not working
Date Posted: 25 Nov 2019 at 3:24am
I'm trying to use crystal reports to filter only dates that are within the last 2 years. For some reason, it's still showing older dates in the results preview.

This is my selection formula:

    {WorkList.StartDate} >= (Currentdate() - 730)

This is showing dates from current back through 2008. Any ideas why it's not showing 2016 to today? It seems to do the same thing with or without the () after Currentdate. Most examples I found are for subtracting 30-60 days from the currentdate, so I'm not sure if I can't subtract that many days?

Any help would be appreciated.

Thanks!

-------------
Accept that which is good



Replies:
Posted By: Michele
Date Posted: 25 Nov 2019 at 3:33am
I changed the link order in database expert so the table with the dates is on the right instead of the left and it seems to have fixed it. It's an inner join =. I wouldn't expect that to affect it.

-------------
Accept that which is good



Print Page | Close Window