Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any function in hive that converts epoch time to standard date?

to_date function takes this "1970-11-01 00:00:00" as an input and returns "1970-11-01".

But I have epoch time as an input. How do I convert it to standard date format?

There is a function to convert standard date to unix epoch time but not the other way.

Any help is appreciated.

Thanks priyank

like image 800
priyank Avatar asked Oct 25 '25 04:10

priyank


1 Answers

From: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-DateFunctions

from_unixtime(bigint unixtime[, string format])
like image 90
xinit Avatar answered Oct 26 '25 17:10

xinit



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!