I have log file with a column in DateTime.Ticks (635677577653488758) which i am trying to convert it to Date in Hadoop Hive.
First i tried the code block below on MySql and it worked. But the same code didn't work in Hive because date_add function works with INT.
SELECT DATE_ADD('2001-01-01 00:00:00', INTERVAL (MAX(f.date) - 631139040000000000)/10 MICROSECOND);
Then i will format it like this...
SELECT DATE_FORMAT(MyDateFromTicks, '%Y-%m-%dT%T.%fZ');
How can i achieve this?
Thank you.