COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: ajaju on 03 Nov 2009 02:37:27 AM

Title: Calculate number of hours between 2 dates-cognos Report Studio
Post by: ajaju on 03 Nov 2009 02:37:27 AM
Hi,

I have 2 database fields that consist of date time formats. I want to see the time difference expressed in hours when I subtract the "recent" date from the "older" date.

Example 1 --> 03/11/2009 16:00:00 - 03/11/2009 14:00 should result in 2 hours
Example 2 --> 08/11/2009 00:00:00 - 08/10/2009 00:00:00 should result in 24 hours

Also the total of all the difference needs to be calculated in hours.
e.g if total of all difference is 24:60 then it should round up to 25 hours.

Thanks in advance!

Regards,
Aarti
Title: Re: Calculate number of hours between 2 dates-cognos Report Studio
Post by: billylodz on 03 Nov 2009 03:11:33 AM
http://www.cognoise.com/community/index.php/topic,7912.msg25908.html#msg25908