COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: laks on 07 Feb 2010 01:58:55 AM

Title: Diiference between two date & time prompts
Post by: laks on 07 Feb 2010 01:58:55 AM
Hi Folks,

I am trying to find difference between two date & time prompts.

Here is my scenario..

I have From and To date & time prompts. I want to find the difference (either in days or months) and use that in conditional block. I want to create a variable on that. I achieved this in SQL but I am having hard time in using that data item in creating a variable.

Can someone suggest, how to do this.

Thanks,
Pavan
Title: Re: Diiference between two date & time prompts
Post by: CognosPaul on 07 Feb 2010 03:59:27 AM
In order to use a data item inside a variable, the variable needs to be triggered from within an object set to the query. In 8.4 you could use a singleton with the difference field in the properties.
Title: Re: Diiference between two date & time prompts
Post by: laks on 08 Feb 2010 02:10:23 AM
Got it. Thanks Paul, your awesome.