COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Venu_Gollapudi on 08 Nov 2007 03:42:28 AM

Poll
Question: How to covert date format of a Date which is coming from a Cube
Option 1: a votes: 0
Option 2: b votes: 0
Title: How to covert date format of a Date which is coming from a Cube
Post by: Venu_Gollapudi on 08 Nov 2007 03:42:28 AM
Hi,

How to convert the format of a date for a data item for which the data source is a Cube.

Ex: Actual date: 12/05/2007 , n I wants to convert the same to Dec 5, 2007
Title: Re: How to covert date format of a Date which is coming from a Cube
Post by: dsg1 on 19 Nov 2007 05:03:42 AM
Hi,

you can convert into ur desired format by:

to_char(actual_date,'Mon dd,yyyy')
Title: Re: How to covert date format of a Date which is coming from a Cube
Post by: Venu_Gollapudi on 19 Nov 2007 06:46:48 AM
This will work out when our data source is Oracle, but My data source is Cube...

Title: Re: How to covert date format of a Date which is coming from a Cube
Post by: rockytopmark on 19 Nov 2007 07:40:40 AM
Maybe I am missing something, but wouldn't your Cube design (Transformer) be the best place to set the desired Format for your Day level in your Time dimension?

If this can't be changed, aren't we looking at setting the Format on the report for that Date column from <Default> to Long or to specify a pattern of something like: Mmm dd, YYYY  ...?
Title: Re: How to covert date format of a Date which is coming from a Cube
Post by: Venu_Gollapudi on 20 Nov 2007 10:40:42 PM
I do not have the privileges to modify the cube and coming to the format of Date column in Cognos, that I have tried but its not working, I think the data type of the date column is not given as Date, I guess that must be a string that’s why its not working.