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

Formula for Date

Status
Not open for further replies.

dboylan

Programmer
Jan 4, 2002
4
US
I'm a Remedy developer that has been using Crystal for just a short while so I need a little direction on using Date functions in a formula field. I have been tasked to develop a report of all tickets (records)
with a value of Assigned, sorted by group and with a total count. Easy so far but the hard part is that I need to show
on a summary report Assigned tickets by group for 4 different time periods - Assigned < 24 hours, 1-3 days, 3 days and 30 days.

This solution seems to be 4 different formula fields. I can get the correct selections using Remedy Table fields and variations of (($DATE$ - 'Create-date') <= (((60
* 60) * 24) * x)) where x is the day variable but how do I duplicate this
using a Crystal formula field? What do I substitute for $DATE$?
 
Code:
DateDiff('h',{YourDate},CurrentDate) < 24
for less than 24hrs
and
Code:
DateDiff('d',{YourDate},CurrentDate) in [1 to 3]
for one to three days

...and so on and so forth...

You can use <,>,= as per your example to avoid overlap, for the 3 days situation, for instance.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top