Skip to content
Advertisement

HANA SQL IsDate() equivalent or to_date function that takes invalid data?

How to do this is HANA SQL.

Advertisement

Answer

Ok this seems to work.

see also tstmp_is_valid() for timestamps. see also here

Alternatively – use a UDF – takes only YYYYMMDD and YYYY-MM-DD

Here is ‘one shot’ ‘to date’ that handles bad data – returns NULL if not valid , make sure that all your dates match the format string or it will convert to null.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement