cancel
Showing results for 
Search instead for 
Did you mean: 

Convert a numeric value into hh:mm:ss in object definition to allow sum

0 Kudos

Hi Everyone,

If possible how would you given a numeric column in a database table that represents time in minutes:

-define an object in designer in the format hh:mm:ss while

-satisfying the condition permitting a sum aggregate on this object at a report level?

I can do a concatenation to get the format hh:mm:ss, however this is not of type time and can not be summed. Is there an alternative?

While this may not sound quite feasible as first glance, I do not want to be limited by my own preconceptions.

Thanks for any feedback.

Ken

Edited by: Banseka Kenneth on Mar 2, 2009 5:25 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ken,

If you wrap the db column in a sum statement then the data will aggregate first

TO_CHAR(SUM(In_Minutes)/60)||':'||TO_CHAR(MOD(SUM(In_Minutes),60))||':00'

That may do the job. It would only aggregate inthe query and not on the report though

Regards

Alan

0 Kudos

Thanks for the pointer Alan.

It is just the booster I need.

I will explore all options available going down that route.

Kind Regards,

Ken

Edited by: Banseka Kenneth on Mar 2, 2009 5:31 PM

Answers (0)