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

date filter error

Started by barrysaab, 08 Feb 2012 05:15:12 AM

Previous topic - Next topic

barrysaab

I am using date filer in my report as :date=(current date,-14)and (current date)  where my date is in the form of 2004-10-21 00:00:00.000 format.It is giving me an error.Please help
Boy! Cognos getting on to me!!!

barrysaab

Please see the date format.
Boy! Cognos getting on to me!!!

barrysaab



I have also tried this but not successful,basically i want to fetch revenue of last 14 days.
[Date]= trunc(_add_days(current_date,-14)) and trunc(current_date)
Boy! Cognos getting on to me!!!

HalfBloodPrince

try to use cast function before you apply filters.
Cast([Date],date)=(_add_days(cast(current_date,Date),-14))

Greg

Sounds like you should be using the "between" operator.  It checks whether a value lies within a range of values.

E.g.
Cast( [Date], date ) between _add_days( current_date, -13 ) and current_date