COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: actcognosuser on 15 Jan 2010 09:07:02 AM

Title: get monthname from parameter .
Post by: actcognosuser on 15 Jan 2010 09:07:02 AM
Hi all,
            I have a text item in my header with parameterdisplayvalue('enddate').

I want to display only the month in the selected end date .I applied dataformat in the text properties .It did not work.

Any suggestions?

Thanks in advance.
Title: Re: get monthname from parameter .
Post by: MFGF on 15 Jan 2010 09:39:20 AM
Hi,

Instead of this, add a data item to your report query with the expression ?enddate?

Drop a Singleton into your page header, and set its Query property to point to your report query.

Then drop your data item into the singleton.

Finally select the data item, and use its Data Format property to format it as a date with only the long month name displayed.

MF.
Title: Re: get monthname from parameter .
Post by: actcognosuser on 15 Jan 2010 10:01:09 AM
Hi MFGF,
 
                 I added the dataitem with the expression?enddate?

The result was : 2014-08-09 T00:00:00.000.

When i run tabular SQL for that query it gives me 2014-08-09.Why am i getting these extra characters after the month????
Title: Re: get monthname from parameter .
Post by: MFGF on 15 Jan 2010 10:38:13 AM
It's the time part of the datetime value.  Just ignore it - when you format the value as date and display only the long month name, you will not see it.

MF.
Title: Re: get monthname from parameter .
Post by: actcognosuser on 15 Jan 2010 10:55:40 AM
Hi MFGF,
                I still see the time .I set the dataformat to display longname for month.
Title: Re: get monthname from parameter .
Post by: actcognosuser on 15 Jan 2010 11:01:29 AM
Used the cast_date.It worked.
Title: Re: get monthname from parameter .
Post by: MFGF on 15 Jan 2010 11:05:31 AM
Did you select a Data Format of Date or Date/Time?