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

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How to Calculate difference between dates

Started by RAJESH_COGNOS, 20 May 2009 01:50:33 PM

Previous topic - Next topic

RAJESH_COGNOS

Hello,
I have a requirement to add a filter so that the report will generate results only for that last two months.There will not be any prompts but when I hit the report link it generates the results for last two months.
   In simple database terms it should calculate (CURRENT_TIMESTAMP - 2 MONTHS).
I tried to use the same (CURRENT_TIMESTAMP - 2 MONTHS) same but it generated an error message.
   What is the filter that I need to use to limit my results to last two months.
I am developing this on ORACLE.

Please help.
Thanks
Rajesh

josepherwin

Hi Rajesh,

Date calculation can only be performed in Report Studio. There is a function called dateadd()

Or the sneaky way of doing it, just get the syntax of the underlying database and you can apply it against the data items.

ajaju

Hi,

You can use the oracle add_months(sysdate,-2) function.
I hope this should work.

Aarti