COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Jkelly228 on 14 Jun 2011 01:10:08 PM

Title: Date Format Change
Post by: Jkelly228 on 14 Jun 2011 01:10:08 PM
Hello All,

I have done some research on date formats and so far I have not found out how to change the format on a date range for a chart that I have done. I would appreciate if someone could help me determine how to change this code. I have used it before, but I guess in a different way. Thank you in advance,

The format as it is today = YYYY/MM
What I want = MMM/YY

to_char([OracleCustomObjects].[OE_ORDER_LINES_ALL].[SCHEDULE_SHIP_DATE], 'MMM-YY')

Kelly
Title: Re: Date Format Change
Post by: Steve on 14 Jun 2011 01:17:17 PM
Looks like yout Date is in character format already. The name you mentioned seems to be the name in Oracle. I don't know what's the name coming out in the report thru the model so assuming the name in the model
that is used in the report is [Date], you can use this:

substring([Date],6,2) + '/' + substring([Date],3,2)

This is if you cannot use the Data Format properties of the Data Item in the chart itself. Usually, we use the Data Format properties of the Data Item to change the display format.
Title: Re: Date Format Change
Post by: Jkelly228 on 14 Jun 2011 01:27:02 PM
Hi Steve,

Thank you for the very prompt reply. I read somewhere else where it talked about using the date format properties, but I was not able to actually find that function. I will give your recommendation a try and see how it works. Thank you. very much

Kelly