If you are unable to create a new account, please email support@bspsoftware.com

 

Ho to add and subtract hours ,minutes to date and time field in report header

Started by goud.4k, 29 May 2013 07:43:48 AM

Previous topic - Next topic

goud.4k

Hi Frds

we are working on TCR( its nothing but cognos8.4)

i have a requirement where , when we select a prompt value like last 2 hours ..the data is getting filtered and showing the data between current system time and past 2 hours.

But we are not able to show that in the header beside Start date and End date..

for example if the current system date and time is 29-5-2013 17:58 ,
then start date should be 29-5-2013 15:58( 2 hour less than system Date and  time)
and End date should be 29-5-2013 17:58( Current System date and time).

Can any one help us how to display Start date and End date Based on Current system date and time.


Our database is DB2.

Thanks.

Lynn

Presumably the information displayed in the header needs to match the value that was used for filtering. So if your data is filtered for timestamps between 29-5-2013 15:58 and 29-5-2013 17:58 and the report takes 3 minutes to run before rendering the header you wouldn't want it to show 29-5-2013 16:01 and 29-5-2013 16:01.

So I'd suggest you use a singleton in your report header and bring in query items containing the values used for your start date and end date filters.