Showing posts with label browsing. Show all posts
Showing posts with label browsing. Show all posts

Sunday, March 11, 2012

Datetime format for dimension Please help me

Dear All,

How can I format a dimesion datetime column . for example while browsing a cube, the value of the dimension column 'DateOrder' shows like that 2002-11-01 00:00:00. I wan to get 01/11/2002 dd/mm/yyyy.

What I have to do. When I changed their cell value property as dd/mm/yyyy it doesnpt working ..Please to crrect my problem

with regards

Polachah

You could create a named calculation in the DSV which formats the Date column however you like and the use this as the name of the attribute.|||

Thank for replying my requirement

I did the same way but the format is not changed.. Also I tried to use that cube in a pivot grid table and tried to change the format there. Still the format is shown as yyyy/mm/dd like that..

|||

You can either break the date into pieces and join it back together however you want

Code Snippet

datename(dd,DateOrder) + '/' + convert(varchar,month(DateOrder)) + '/' + datename(yyyy,DateOrder)

But you would have to do a bit more work on the above code to get it producing a leading "0" on the day and month.

Or you can use the third parameter of the convert function that is used when converting from a datetime to a string (which I prefer to use if I can)

Code Snippet

convert(varchar,DateOrder,103)

Format 103 is dd/mm/yyyy - Books Online has a list of all the format numbers in the help for the CONVERT() function|||

Dear sir

Thank you very mcuh ... for your help .. I got from your advice what I need thank u verymuch again