Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java long to hours minutes and seconds

Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date(millis));

//And then....
calendar.get(Calendar.HOUR_OF_DAY) //use Calendar.HOUR for AM format
calendar.get(Calendar.MINUTE)
calendar.get(Calendar.SECOND)
 
PREVIOUS NEXT
Tagged: #java #long #hours #minutes #seconds
ADD COMMENT
Topic
Name
2+3 =