COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: boognish on 20 Jan 2017 12:29:44 PM

Title: Format Date Parameter in Report Expression
Post by: boognish on 20 Jan 2017 12:29:44 PM
Hi All,
I have a date parameter I'd like to format as 'Month Year' within a report expression. Parameter is a date, and I'd like it to display as 'January 2017' in my report expression.

to_char(
timestamp2date (
string2timestamp (ParamDisplayValue('Date_Param') ) )
,'Month') 

I seem to be getting hung up on the to_char part - any advice would be greatly appreciated!

error:
CRX-API-0011 The function name was not found at or near the position '7' in expression: "to_char(
timestamp2date (
string2timestamp (ParamDisplayValue('Month_Param') ) )
,'Month')



Thanks.
Title: Re: Format Date Parameter in Report Expression
Post by: Kiran Kandavalli on 30 Mar 2017 04:37:06 PM
Can you create the same expression in a Data item and drag it as a single ton. As some of the function we cannot do it in Report expression