Wednesday, 9 July 2014

Convert Unix Million Seconds to String Timestamp in Hive

from_unixtime(CAST((last_visited / 1000) as Bigint))

from_unixtime(bigint unixtime[, string format])Converts the number of seconds from unix epoch (1970-01-01 00:00:00 UTC) to a string representing the timestamp of that moment in the current system time zone in the format of "1970-01-01 00:00:00"

No comments:

Post a Comment