Last active
May 11, 2019 01:30
-
-
Save ahmedbr/b975a9c4c5b19c2e1e139bd5a777c041 to your computer and use it in GitHub Desktop.
Android/Converting TimeStamp into Date.
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
private String getDate(long time) { | |
Calendar cal = Calendar.getInstance(Locale.ENGLISH); | |
cal.setTimeInMillis(time * 1000); | |
String date = DateFormat.format("dd-MM-yyyy", cal).toString(); | |
return date; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment