java - How to get human readable date with unix time stamp in milliseconds? -


this question has answer here:

is there solution without using date class deprecated, , without having specify format in simpledateformat("yyyy-mm-dd hh:mm:ss.sss"), since want readable format? thanks

the date class isn't deprecated - many of constructors/methods are.

you can still use:

string text = new date(millissinceepoch).tostring(); 

you can't change string format - use system default time zone, example - may enough you.

personally i'd still use either simpledateformat or better yet java.time or joda time, if really don't want that, might enough.


Comments

Popular posts from this blog

Error while updating a record in APEX screen -

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

ios - Xcode 5 "No such file or directory" -