How do I save and load the current time in java? -


i need able save , load current time in java. use system.currenttimemillis() store in long, need able write out in different formats, like; "yyyy-mm-dd", "dd/mm hour:min:sec", , such.

the program save time got system.currenttimemillis() txt file, if happens computer or program needs able go right it's task.

you can use code similar following

string formatted = new simpledateformat("yyyy-mm-dd").format(new date(system.currenttimemillis())); 

Comments

Popular posts from this blog

visual studio - vb.net filter binding source by time -

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -