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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateDiff day results

Status
Not open for further replies.

AssetRecovery

Programmer
Sep 17, 2003
14
US
I have a formula that calculates how long a support ticket has been in the queue based on the date created. I am returning the results using the "d" for day. My results are returning with:
1 Day
2 to 6 Days
7 to 30 Days
>31 Days
Current Day

Question: Do I have any control over these result ranges? Say I want to show 2 to 5 Days or 10 to 20 days or even combine current day with 1 day so it's a 48 hour period instead of a 24 hour period?
 
Sounds like you want to Group by these particular ranges.

Create a formula that will determine the number of days:

WhileReadingRecords;
DateDiff("d",{table.create_date,CurrentDate)

Create a group based upon the above formula.
In the second drop down list of the Insert Group pop up menu, choose "in specified order".
Create a name for you first group "1 Day" say.
Click New, and then set up the criteria for the records to be included in this group.

{@formula name} is equal to 1

Click OK.
Repeat the process for each the break downs that you want to see:
Current Day
2 to 6 Days
7 to 30 Days
>31 Days

The Groups will display in the order that you create them unless you move them around with the arrows.


~Brian
 
The formula is missing one bracket. It should look like this:

WhileReadingRecords;
DateDiff("d",{table.create_date},CurrentDate)


~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top