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
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. This field is a date time field.
Any ideas on how i can calculate the business hours between 2 date_time fields?
Thanks for your help in advance.
Brandi
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
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. This field is a date time field.
Any ideas on how i can calculate the business hours between 2 date_time fields?
Thanks for your help in advance.
Brandi