java - How to convert long millisecond in simpledate format ex "yyyy-MM-dd hh-MM-ss" in Pig Hadoop -


how convert long millisecond in simpledate format ex:

yyyy-mm-dd hh-mm-ss

in pig hadoop

example input = 1409051466000 output = "yyyy-mm-dd hh-mm-ss" 

in pig script.

thanks krishanthy-mohanachandran.

but have script in pig. iam trial , done.

to convert millisecond in simple dateformat yyyy-mm-dd hh-mm-ss

script in pig:

curtime = milisecond-long (1409051466000) 

to format can convert date , string, in string free format.

can add:

tostring(todate(curtime),'dd-mm-yyyy hh:mm:ss') curtime 

resolved.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -