I'm trying to convert from string to timestamp in hive I'm using mentioned below code
from_unixtime(unix_timestamp("12/20/2012 00:54:26.001000", "MM/dd/yyyy HH:mm:ss.SSSSSS"),"yyyy-MM-dd HH:mm:ss.SSSSSS") as CURR_TS
I'm getting output as 12/20/2012 00:54:27
(seconds getting round off)
but I want output as 12/20/2012 00:54:26.001000