Poll
Question:
How to convert number format to date format
Option 1: Cognos 8
votes: 0
Option 2: Report Studio
votes: 0
Hi,
I have a dataitem called month and it is number format in Oracle database.
Now I want to this number item(200708) to date format i2 2007-SEP or SEP-2007.
I have given the follwoing expression and format changed to date, even though it is not working.
Can any one help me on this
to_char(to_date([Month],'RRRRMM'),'RRRR-MON')
Thanks in Advance
RP
I might be wrong, but shouldn't it be:
to_char(to_date([Locality KPI Results].[Locality KPI Fact].[Month Key],'YYYYMM'),YYYY-MON')
Alternatively, if it doesn't work, try:
to_char(to_date(to_char([Locality KPI Results].[Locality KPI Fact].[Month Key]*100+1),'YYYYMMDD'),YYYY-MON')
Thank you, the code is woking fine, but I need how to do the ascending order, by default the oracle database takes as o1, now if we can addtogether it doesn't showind dascending order. could tell me ho to do the ascending also.
Thank you very much
Just sort it descending in the query itself. That should be easy.
Thank you it is working