COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Joker on 16 Sep 2014 07:13:40 AM

Title: Difference of time period between consecutive rows
Post by: Joker on 16 Sep 2014 07:13:40 AM
Hi,

I need to calculate the time period between the last 2 runs of a report(for example, for a report scheduled on a weekly basis, you would expect to see 7 days between report runs).The package is relational.The field that has to be used is timestamp.How should I do this?

Regards,
Joker

Title: Re: Difference of time period between consecutive rows
Post by: Francis aka khayman on 16 Sep 2014 08:54:07 PM
you can use _days_between after converting your timestamp to date
Title: Re: Difference of time period between consecutive rows
Post by: Joker on 16 Sep 2014 10:44:19 PM
Quote from: khayman on 16 Sep 2014 08:54:07 PM
you can use _days_between after converting your timestamp to date

Yeah, but the thing is how will I use the cell of the previous row?
I have to find the difference between the dates in concecutive  rows.

In Brief I can say that I want to use running-difference for timestamp field as it is required for a Audit report.
I am thinking that it can be done by using epoch values. But How can I convert my timestamp field to epoch date?

Please Suggest a Suitable way to achieve the requirement.

Regards,
Joker