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

Calculating Time..

Started by shri, 11 Jul 2008 01:23:16 AM

Previous topic - Next topic

shri

hi everyone,

how to calculate the time in report studio, I have three time fields i need add them and display them as
hh:mm:ss. for example i have time1, time2 and time3 as 00:30:20, 00:20:10 and 01:00:00 i want to add them and show them as separate column as Totaltime 01:50:30. (Windows 2003 with both cognos 8.1 and cognos 8.3 environment)

thanks

Mr.Cognos

Hi CogStar,

If time1,time2 and time3 are date type or timestamp you can create four calculated fields like:

  • to_char(time1,'hh24:mi:ss')
  • to_char(time2,'hh24:mi:ss')
  • to_char(time3,'hh24:mi:ss')
  • to_char(time1+time2+time3,'hh24:mi:ss')

And add to your report where you want.


shri

Thanks Mr.Cognos, I will try that.