Cast string to date in specific format in SAP HANA



I think you just need to use ‘TO_VARCHAR’ and ‘TO_DATE’ functions.

SELECT TO_VARCHAR(TO_DATE(<your field>, 'YYYYMMDD'), 'YYYY-MM-DD') FROM <Table>
raja
Updated on 14-Feb-2020 10:06:12

Advertisements