java - What about TimeFormat? Converting Timestamp -


how format java.sql timestamp displaying?

what timeformat, how can convert timestamp string showing time?

this 1 way it...

new simpledateformat("hh:mm:ss")     .format(new date(timestamp.gettime())); 

edit: turns out simpledateformat can format timestamps easier:

new simpledateformat("hh:mm:ss")     .format(new timestamp(system.currenttimemillis())); 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -