Converting date code from netezza to hive/impala

impala
sql
#1

I was trying to convert below impala code to hive. I couldn’t understand the query itself.

//// to_date(‘01-jan-1970’::“VARCHAR”, ‘DD-MON-YYY’::“VARCHAR”)+ INT4((table.column_date/‘86400’::“NUMERIC”))) as alias_ name /////

We have to modify it to work on hive/impala.

This is how I changed :
Cast(to_date(‘01-JAN-1970’ , ‘DD-MON-YYYY’) + table.mod_date/86400 as date) as modified date

But throwing error : no matching function with signature : to_date(string,string).

Please help me.
Thank you

0 Likes