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

convert number to Date

Started by RP, 12 Sep 2007 09:19:53 AM

Previous topic - Next topic

RP

Hi all,

I have a question, pl any one can help me. My date field is oracle database ie. number(30122007) and now I want to convert to date (YYYY-Mon) in reportstudio, pl can any one tell me how to convert number to date.

Thanks
RP

MDXpressor

Use the Oracle to_date function.

to_date([Date],'YYYY-MMM-DD')

The string 'YYYY-MMM-DD' can be arranged to match the output you are seeking. 

At times I have had to convert to a char first (to_date(to_char([Date]), 'YYYY-MMM-DD')
No, a proof is a proof. What kind of a proof? It's a proof. A proof is a proof, and when you have a good proof, it's because it's proven.

-Jean Chretien

raja.chanda

Quote from: RP on 12 Sep 2007 09:19:53 AM
Hi all,

I have a question, pl any one can help me. My date field is oracle database ie. number(30122007) and now I want to convert to date (YYYY-Mon) in reportstudio, pl can any one tell me how to convert number to date.

Thanks
RP

to_char(to_date(to_char([date]),'DDMMYYYY'),'YYYY-Mon')
or
to_char(to_date([date],'DDMMYYYY'),'YYYY-Mon')