COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: actcognosuser on 26 Oct 2016 10:58:19 AM

Title: How to change format of a paramaterdisplayvalue()
Post by: actcognosuser on 26 Oct 2016 10:58:19 AM
Hello All,

I need to change the paramdisplayvalue('date') of a from and to date in a date prompt to display long name of month.

I tried using string2date(paramvalue('date')). This works . But if if nothing is selected then it will display --,since there is no value to format.

Also tried Cast and to char on paramdisplayvalue() which gives a parsing error.DB:ORACLE
Title: Re: How to change format of a paramaterdisplayvalue()
Post by: dax on 26 Oct 2016 10:40:04 PM
Hi

You should be able to change the style of the date without modifying the actual layout calculation.  If you choose something like Date Style = Long and Display Months = Long name you should end up with something like "27 October 2016".

Dax

Title: Re: How to change format of a paramaterdisplayvalue()
Post by: Invisi on 27 Oct 2016 04:10:33 AM
Do you get your date from a date dimension in your datawarehouse?
Title: Re: How to change format of a paramaterdisplayvalue()
Post by: BigChris on 27 Oct 2016 08:13:10 AM
Have you consider having a couple of blocks (I'm assuming you're putting these values into the header of a report or similar)? You could then render then two blocks based on a variable of ParamDisplayValue('date') is not missing.