Print Page | Close Window

>= Formula

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=17242
Printed Date: 02 May 2024 at 10:23pm


Topic: >= Formula
Posted By: Beebt77
Subject: >= Formula
Date Posted: 08 Aug 2012 at 6:20am

Hello all,

I need help on working with  an existing formula that I have a total of minutes  that are added up for certain  time frames, and I do get the totals for these rooms, but if the total is greater than 60 minutes it should default to "0", and this is where I am stuck.
 
My current formula is
 
IF {Field name} = PREVIOUS ({Field Name}) and {Field DATE}= PREVIOUS ({Record Field DATE}) THEN
((TIME({ENTERED_ROOM}) - TIME(PREVIOUS
({CaseEXIT_TIME})))/60) else 0;
 
I am trying to  get the total time over 60 minutes to default to 0.
 
Any ideas?
 
Thanks
Bee



Replies:
Posted By: kevlray
Date Posted: 13 Aug 2012 at 10:41am
I think that a datediff("n",{ENTERED_ROOM}, {ENTERED_ROOM}) should work.



Print Page | Close Window