Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Determine the difference between two datetime values in Cognos RRDI Reporting

We have two timestamp attributes in an RTC work item. Using the Cognos RRDI Report Studio, how can we determine the difference between the datetime values fetched from these fields? The resulting answer should be in hours.

Example:
Attribute 1: 18 Aug 2014, 01:00:00 PM
Attribute 2: 19 Aug 2014, 02:00:00 PM

Result: 25 hours

Please let us know how to achieve this.

0 votes



One answer

Permanent link
Hello Sanket,

a solution to your request is described at this link:
http://www.cognoise.com/community/index.php/topic,7912.msg25908.html#msg25908
(extract(hour,[Data Item2])*60+extract(minute,[Data Item2]))-(extract(hour,[Data Item1])*60+extract(minute,[Data Item1]))+_days_between([Data Item1],[Data Item2])*1440

that is in minutes, to get it in hours it could be modified to something like this
extract(hour,[Data Item2])-extract(hour,[Data Item1])+_days_between([Data Item2],[Data Item1])*24

Best Regards,

Francesco Chiossi

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 7,495
× 1,381
× 481
× 403

Question asked: Aug 18 '14, 8:31 a.m.

Question was seen: 13,834 times

Last updated: Aug 19 '14, 4:52 p.m.

Confirmation Cancel Confirm