Skip to Content
avatar image
Former Member

SAP HANA TO_DATE()

How can I convert a date format such as "Wednesday,22 January, 1960" using TO_DATE()??

I want to insert the return value of todate() to a date column and Hana accepts date in yyyy-mm-dd format only.

Thanks in advance for help.

Praveen S

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Mar 14, 2013 at 12:54 PM

    Hi Praveen,

    Here you go:

    select to_date(replace(substr_after('WEDNESDAY,22 January, 1960', ','), ',', ''), 'dd MONTH yyyy') from dummy;

    Please find here all the date formats that can be used in the TO_DATE function.

    Regards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded