cancel
Showing results for 
Search instead for 
Did you mean: 

Error with time formula in hh:mm:ss format-hour must be between 0 and 23

Former Member
0 Kudos

I have a formula that adds the duration of phone calls for employees. and has a grand toal at the bottom of the report. I have built many report based off of this same formula, one for daily, one for weekly, and one for monthly for each employee. Everything works perfect until I run the monthly report. It will even work correctly as long as the grand total is less than 23 hours. Is there a way to allow the grand total in this format to have more than 23 in the hours?

Example:

One report goes to a department head which is in charge of say 4 sales people. In the monthly report he will receive a total for each sales person of total nuimber of calls and total talk time. The talk time totals for each rep are 16:23:45,10:07:14, 06:20:06, and 05:08:40. The grand total should be 47:09:45 for 47 hours, 9 minutes, and 45 seconds for the entire month. Can anyone h elp me resolve this issue?

Accepted Solutions (1)

Accepted Solutions (1)

former_member292966
Active Contributor
0 Kudos

Hi Dan,

Your formula is expecting the result to be a time which is why you're getting the error. You'll need to have the result come out as a text if you can.

One way is to take the ABS (hours / 24) will give you the number of days. The remainder will be the hours.

Again, format the result into a string and that should work.

Good luck,

Brian

Edited by: Brian Dong on Oct 2, 2008 11:46 PM

Former Member
0 Kudos

Thanks for the reply. What I was thinking was to add the day field so that I would have DDHHMMSS instead of HHMMSS. However I am still a newbie at Crystal reports XI and formulas the formula that I currently have for the grand total is:

TimeSerial(Sum ({@Hours}),Sum ({@min}),Sum ({@sec}))

How can I add the days into this formula or get the other formula to have days, hours, minutes, seconds, instead of just hours, minutes, seconds?

Thanks again,

Answers (1)

Answers (1)

Former Member
0 Kudos

I am still trying to find an answer for this problem. I am pretty new to Crystal reports and formulas. Is t here anyone that can give me a call or that can do a remote session and actually look at the report to find a solution. The formula I have works fine if the grand total,total talk time, and/or daily talk time in under 23:59:59(HH:MM:SS). But if any one of those fields has hours above 23, mintes above 59, or seconds above 59 I get an error. PLease help and once again any and all information is greatrly appreciated.

thanks,

Dan Odom

770-753-7917