If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Report Studio 8

Started by RP, 19 Oct 2007 01:51:09 PM

Previous topic - Next topic

RP

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

COGNOiSe administrator

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')

RP

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

COGNOiSe administrator

Just sort it descending in the query itself. That should be easy.

RP

Thank you it is working