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

Customize Date prompt

Started by bbtresoo, 12 Dec 2013 08:32:19 AM

Previous topic - Next topic

bbtresoo

HI guy, I've been facing a big problem since 3 days.

I just need to do 2 comparaisons between two dates ( date prompt and data item). the problem is the format date from date prompt is like Jul 31,2012 ( it just takes the first 3 characteres of the month), I've been trying to change the format of my data item  but no relevant result, here are my try 
to_date(to_char([Date As Of]),'MM DD YYYY')<= to_date(to_char(?Prompt_AsOfDate?),'MM DD YYYY'))  => when I validate the syntax,everything  is good but when i run the report nothing happened , is like the server can't understand my expression.

The second option I get in my mind is to customize my date prompt, create a small script which  provide the entire month instead of the first 3 characters by default, but I don't know how to start. Thank you very much in advance for you tips.

MFGF

Hi,

What data type is your data item? Is it a date? If so, you don't need to worry about formats - your date prompt will also generate dates regardless of how things display on the screen. In this case your filter would be:

[Date As Of] <= ?Prompt_AsOfDate?

If your data item isn't a date, try casting it as a date data type in the expression above. From the syntax you included originally, it does look like it's already a date, though.

MF.
Meep!