All,
I have 2 date/time fields in the following format: 11/10/2008 10:00:00 AM 
I tried to use the following formula for the first part to convert as 
days: got this from http://www.kenhamady.com/form01.shtml

WhileReadingRecords;
Local DateVar Start := {HPD_Help_Desk.Submit_Date}; // place your Starting 
Date here
Local DateVar End := {HPD_Help_Desk.Last_Resolved_Date}; // place your 
Ending Date here
Local NumberVar Weeks; 
Local NumberVar Days; 
Local Numbervar Hol;
DateVar Array Holidays;

Weeks:= (Truncate (End - dayofWeek(End) + 1 
- (Start - dayofWeek(Start) + 1)) /7 ) * 5;
Days := DayOfWeek(End) - DayOfWeek(Start) + 1 + 
(if DayOfWeek(Start) = 1 then -1 else 0) + 
(if DayOfWeek(End) = 7 then -1 else 0); 

However, when I try to save this formula it says "a date is required" and 
points to the Submit Date. So i changed it to DateVar to DateTimeVar and 
it runs but it does not give me the correct day results. 
Any ideas on how i can calculate the business hours between 2 date_time 
fields?
I know i can do this within remedy through workflow however i need to do 
it within the crystal report instead of the remedy system.  I tried 
looking up the formulas from teck-tips but did not receive any feedback. 
Any advice would be great.
Thanks for your help in advance.
We are using Crystal Reports XI with Remedy 7.1 and ITSM 7.0.3 on SQL 2005 
Windows 2003 Server.
Thanks again,
Brandi



_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to