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

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 -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -