Joined: 01 Nov 2010
Location: United States
Online Status: Offline
Posts: 2
Topic: Date Range Posted: 01 Nov 2010 at 1:03pm
I'm very new to Crystal and am having a problem understanding creating a formula for date ranges.
I have a report that brings over all the issues for a particular project. This report will be a sub-report in an existing report. I want the sub-report to only show the last two weeks worth of data based on the report creation date.
Where do I begin? I have tried using the formula workshop and I just can't seem to get anything to work.
Joined: 04 Feb 2008
Location: New Zealand
Online Status: Offline
Posts: 55
Posted: 01 Nov 2010 at 1:37pm
Try putting something like this into your select expert:
{table.datefield} >= CurrentDate-14 and {table.datefield} <= CurrentDate
CurrentDate returns the present date. Subracting 14 takes off 14 days (two weeks). You'll need to figure out whether you need ">=" or just ">" etc to get the date boundaries right. Good luck.
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