Date format coming up as 2006.00

I have Year column in my database as int. I am creating a universe with the Year Dimension object. I am putting its datatype as Number (as it is int in the database). Now the problem is in the reports it is showing up as 2006.00 instead of 2006. Is formatting need to be done on the universe level or on the report level?

Thanks,
-rk


rit372002 :us: (BOB member since 2006-11-02)

If you want future reports to automatically get the correct format – then yes, most definately change the object format in the universe.

However, that will not “correct” any existing reports, since you could have applied formatting in them that you wish to retain. So, for any existing reports, you’ll have to re-format in the report.


Anita Craig :us: (BOB member since 2002-06-17)

Here is the problem: When I change the object format in the universe as Date then it comes as 0000 in the report. :(…

-rk


rit372002 :us: (BOB member since 2006-11-02)

try changing the object format to character

like this

to_char(TABLE.COLUMNNAME,‘yyyy’)


porsche993 :us: (BOB member since 2005-11-30)

You have a 4-digit integer that represents a year? You don’t need to make it DATE nor character.

Simply format it as 0000 rather than the #,##0.00 (or whatever the current formatted-number format is).


Anita Craig :us: (BOB member since 2002-06-17)

Just something to think about:
I would prefer to have Year either stored as a DATE data type or as a CHARACTER/STRING, this way one cannot SUM/AVG, etc. year numbers, which would be pretty pointless IMHO.


Andreas :de: (BOB member since 2002-06-20)

I most certainly agree with you, Andreas – but if someone doesn’t get to design the tables – and has a year in an integer string, then formatting it properly is just what one has to do. :wink:


Anita Craig :us: (BOB member since 2002-06-17)

You are absolutely correct, Anita. That’s what I did and I got the right years.

Thanks a lot.
-rk


rit372002 :us: (BOB member since 2006-11-02)