COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: jasp on 18 May 2011 01:15:38 PM

Title: Convert MUN to MMDDYYYY format
Post by: jasp on 18 May 2011 01:15:38 PM
Hi All,
I have a x tab report where i have a prompt page with a month selection/ parameter on it . This Parameter is then displayed in the column of a xtab.

What i want is for the date to be displayed in MMDDYYYY format.

The Mun that is being generated from the cube is as follows :

[Finance Cube].[Time].[All Years].[Month]->:[PC].[@MEMBER].[20080101-20080131] , when i try the formatting option nothing happens all that is displayed is Jan/2008.

Does anyone know how i can convert the above to display on a report to show Jan 31, 2008.

Thanks
Title: Re: Convert MUN to MMDDYYYY format
Post by: CognosPaul on 19 May 2011 01:50:44 AM
The easiest way to do this would be to add an item to the attributes of the month level. Set the Short Name of the level to the string you want displayed, and use that as the display item in your crosstab.

If you can't do that, for whatever reason, you can use the report expressions to convert the incorrect string to a date, then use the regular Data Format property.

The following is based on the Sales and Marketing cube in Cognos 10, but it will work perfectly in Cognos 8.

If all goes well you should get the results your expecting.
Title: Re: Convert MUN to MMDDYYYY format
Post by: jasp on 19 May 2011 03:58:24 PM
Paul,

i tried the below, but got a little lost from step 2....i could not find the properties row u refer to.

I followed the steps and it gives an error. It says contact administrator.

Any help
Title: Re: Convert MUN to MMDDYYYY format
Post by: jasp on 20 May 2011 11:05:29 AM
Hi Paul,

i finally got it to work, using your approach.

Thanks for your help much appreciated.