Hi All,
I have a dat item in which i have given the expression as current_date.
The current date displays in the format Jul 16,2009 .
Now i want to format the date to 20090716
I tried using the convert function and other SQL functions. But it does not work. It throws error as not supported because it is MDX.
Please let me know what is the exact expression to be used for conversion.
Thank you very much for the help.
Thanks,
Sg
Try this...
in the data time expressino code as cast_date(current_Date). then in the dataformat of that data item select the type to be date and in the pattern as yyyymmdd
Sorry the patter should be yyyyMMdd. you need not even cast the curren_date data item.
Thanks,
Sridevi
Thank you for the reply. But this doesn't work. I tried doing the same.
My requirement is i want to convert the date in another format.
For example, i take a data item and give the expression as current_date
it gives, jul 16, 2009.
Now i want to convert to any other format. here convert or cast function does not work beacuse it is an MDX. The source is SSAS cube.
Let me know if you want more info.
Thanks,
sg
you have to modify the Data Format of that data item
Select
Date Style : Medium
Date Separator: /
Dislplay Years : Yes
Dsiplay Months: Two Digits
Dsiplay Days : Two Digits