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
S3v3n11
Messages: 1
Registered: March 2007
Junior Member
I am using Discoverer Version 10.1.2.48.18 against Oracle 10.2.0.1.0 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?

Thanks!

Tony
Re: Totaling a Time Column [message #222823 is a reply to message #222818] Tue, 06 March 2007 09:29 Go to previous message
skooman
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.


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


Current Time: Tue Nov 26 16:15:10 CST 2024