Char to Date

Database

Char to Date

Hello experts,

I need help for converting

Char date format to date

I need to convert CHAR FORMAT '11-JULY-2008' TO DATE FORMAT 2008-07-11

CHAR FORMAT '11-MAY-2008' TO DATE FORMAT 2008-05-11

SEL CAST( '11-JULY-2008' AS DATE FORMAT 'YYYY-MM-DD')

Above Conversation is not working.

Please help me.

Thanks in Advance
2 REPLIES

Re: Char to Date

Is that you are looking for?

SEL CAST( '11-JULY-2008' AS DATE FORMAT 'DD-M4-YYYY')
N/A

Re: Char to Date

Try this...

SELECT CAST(CAST( '11-JULY-2008' AS DATE FORMAT 'DD-M4-YYYY') AS DATE FORMAT 'YYYY-MM-DD')