Convert epoch time to dd/MM/yyyy using JAVA -


this question has answer here:

i need convert string epoch (unix time) format date class after string formatted (dd/mm/yyyy).

thank !

unix time number of seconds since 1 january 1970, should work

date date = new date(unixtime * 1000); string str = new simpledateformat("dd/mm/yyyy").format(date); 

btw simpledateformat accepts millis argument too, possible same result

string str = new simpledateformat("dd/mm/yyyy").format(unixtime * 1000); 

Comments

Popular posts from this blog

javascript - JS causing window size to be bigger than necessary - Dropdown bug -

How to mention the localhost in android -

php - Calling a template part from a post -