timestamp - How to Change date format in hive -
i have 1 table in hive column "dates"(string) , value "5/29/2014 11:58:02 am". need alter datatype string timestamp process data,i have created temporary table , trying insert info original table:
create table temp select level,from_unixtime(unix_timestamp(dates,'yyyy-mm-dd hh:mm:ss')) newtime,source,eventid,task,description,category logs;
it didn't work .how solve this? please help.
can seek unix_timestamp below , see if works.
unix_timestamp(dates, 'mm/dd/yyyy h:mm:ss a') to know more date formatting check link : http://docs.oracle.com/javase/7/docs/api/java/text/simpledateformat.html
ps: have not tried not have hive setup in front end of me now.
timestamp hive
No comments:
Post a Comment