Home » Developer & Programmer » Reports & Discoverer » Totaling a Time Column
Totaling a Time Column [message #222818] Tue, 06 March 2007 09:04 Go to next message
Messages: 1
Registered: March 2007
Junior Member
I am using Discoverer Version against Oracle Enterprise.

I have a calculated column that looks like this: '2:12'. It represents 2 hours and 12 minutes. It is a varchar ( string ) column. What my user needs to do is total that column to get the total hours and minutes.

Anyone have any ideas?


Re: Totaling a Time Column [message #222823 is a reply to message #222818] Tue, 06 March 2007 09:29 Go to previous message
Messages: 913
Registered: March 2005
Location: Netherlands
Senior Member
Hi Tony,

You'll have to change the column to a "proper" date format, that's the only way to be able to aggregate it (or do any sort of calculation on it).
This should be possible to do in Discoverer, but personally I would do it in the database. Create a view including the column the users are currently seeing, and add a column with the same data but in a date format. Then you can use the latter for the calculations.

More advanced option is to create a database function that "transforms" a date value to the representation you need (usually just a to_char, but I've seen some weird date representations... Wink), register it in Discoverer, enable it to be used in the plus/viewer edition. Now you can use the date-format-column with the formatting function around it, thus still calculating with it.

Previous Topic: Cumulative summary in Report
Next Topic: Report Triggers in D2K
Goto Forum:

Current Time: Fri Jul 21 10:08:11 CDT 2017

Total time taken to generate the page: 0.17084 seconds