Last active
December 18, 2015 14:09
-
-
Save semihozkoroglu/5795403 to your computer and use it in GitHub Desktop.
Current Timestamp to datetime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date date = new Date(System.currentTimeMillis()); | |
DateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); | |
Commons.infoLog("hm", df.format(date)); | |
------------------------- | |
DateFormat dateFormat = new SimpleDateFormat("hh:mm:ss"); | |
String currentTime = dateFormat.format(SystemClock.uptimeMillis()); | |
Commons.infoLog("hm", currentTime); | |
http://www.mysamplecode.com/2012/03/java-get-current-date-time.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment