BusinessObjects Board

Creating averages from Time objects

I am trying to use 2 time objects

Open time and closed time, and calculate the average time open of a message, so the formula would need something like the number of messages and the open time and the closed time to work out the average, but i can’t seem to get this to work?


maz118 :uk: (BOB member since 2003-08-20)

I think there are direct functions available to calculate time differences (unlike the functions that work on data-differences)
In the past I used to solve this by taking portions out of the time-string (using Substr and ToNumber functions) calculating the seconds after midnight. This would result in 2 integers, subtracting them resulted in time differnce in seconds. This could be used to calculate averages.
The result can then be formatted back to something like 7.23 min

It is quite cumbursome, but doable if the time strings belong to the same day.

Lovely calc like:

=ToNumber(SubStr(FormatDate( ,“HHmmss”) ,1 ,2))*3600+ToNumber(SubStr(FormatDate( ,“HHmmss”) ,3 ,2))*60+ToNumber(SubStr(FormatDate( ,“HHmmss”) ,5 ,2))

and

=FormatNumber(Truncate((/60) ,0) , “00”) + “:” + FormatNumber(Mod( ,60) ,“00”)

to get the difference back into shape…

If you want an example, mail me directly…


blom0344 :netherlands: (BOB member since 2002-09-04)

Sorry,

I meant to say that there are NO standard functions for getting the time differnence as opposed to date difference, but I stand to be corrected…


blom0344 :netherlands: (BOB member since 2002-09-04)

Please, take a look at this thread Can I create a Variable, and use a Function?


Andreas :de: (BOB member since 2002-06-20)