I am using Crystal 8.5 and need to calculate business hours, no weekends, including holidays. I found the sample report called BusinessDays_Hours (How To Calculate Business Hours or Business Days) in the zip file cr_business_dh_samples in the Business Objects knowledge base. The code for the field @MANUAL_BusinessHoursIncludeHolidays looks like it does exactly what I need. But when I use the code in my report, it doesn’t work as I expect.
My start date is a SQL date time field for an application and includes Month, Day, Year and time.
My end date is also a SQL date time field for a contact and only includes Month, Day, Year—no time is captured. The end date for a contact can be before the start date. In that case, I just want to display 0 hours because the purpose of the report is to calculate how long it takes for a contact after an application is made.
When Crystal displays the end date, it adds 12:00:00 AM for the time for every record.
Here is some sample data I am getting.
App Date Contact Date Hours
1. Tues 3/8/2005 10:43:56 AM Tues 3/8/2005 12:00:00 AM 9.0
2. Wed 2/23/2005 2:25:49 PM Mon 1/17/2005 12:00:00 AM 0.0
3. Wed 4/27/2005 9:47:08 PM Tues 4/26/2005 12:00:00 AM 9.0
4. Tues 1/18/2005 11:42:27 AM Wed 1/19/2005 12:00:00 AM 5.3
I would like 0 hours for number 1 and number 3 above. Number 2 and number 4 are right.
Ken Hammady’s formula did not work as he noted that his formula assumes that “the start and end times are within your working day.” In my case, applications are made 24/7 on line (start date) and Crystal adds the 12:00:00 AM to the end date.
I hope someone can help.
Thanks.
My start date is a SQL date time field for an application and includes Month, Day, Year and time.
My end date is also a SQL date time field for a contact and only includes Month, Day, Year—no time is captured. The end date for a contact can be before the start date. In that case, I just want to display 0 hours because the purpose of the report is to calculate how long it takes for a contact after an application is made.
When Crystal displays the end date, it adds 12:00:00 AM for the time for every record.
Here is some sample data I am getting.
App Date Contact Date Hours
1. Tues 3/8/2005 10:43:56 AM Tues 3/8/2005 12:00:00 AM 9.0
2. Wed 2/23/2005 2:25:49 PM Mon 1/17/2005 12:00:00 AM 0.0
3. Wed 4/27/2005 9:47:08 PM Tues 4/26/2005 12:00:00 AM 9.0
4. Tues 1/18/2005 11:42:27 AM Wed 1/19/2005 12:00:00 AM 5.3
I would like 0 hours for number 1 and number 3 above. Number 2 and number 4 are right.
Ken Hammady’s formula did not work as he noted that his formula assumes that “the start and end times are within your working day.” In my case, applications are made 24/7 on line (start date) and Crystal adds the 12:00:00 AM to the end date.
I hope someone can help.
Thanks.