If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Can't show intervals (hour to second) in short form

Started by kyle556, 15 Aug 2008 06:17:19 PM

Previous topic - Next topic

kyle556

I'm working with hour to second intervals and whenever I add them to a report studio report, they show up in long form. Example: "1 hour 13 minutes 42 seconds". I would like to show them in short form like this: "1:13:42". I assumed that it was a data format option, but I couldn't find such an option in format properties. I started a service request with Cognos, but I was told what I want is not possible in the current version. In long form, intervals take up too much space on a report. I'm hoping that someone might know a trick to get around this limitation. Can anyone help? I'm running 8.3 SP2.
Thanks.

blom0344

Depending on the original format of the data you can use seperate calculation objects that hold the values for hour/minute/second. This involves among others the 'mod' function and division by 3600 / 60.
The end result is then achieved by concatenating the values as:

[hourpart]&':'&[minutepart]&':'&[seconds]

after creating strings from the numerical values (by using cast)