Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android parse timestamp


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;
}

Source by coders911.org #
 
PREVIOUS NEXT
Tagged: #android #parse #timestamp
ADD COMMENT
Topic
Name
7+6 =