java 8 seconds to days

Solutions on MaxInterview for java 8 seconds to days by the best coders in the world

showing results for - "java 8 seconds to days"
Emelie
01 Nov 2016
1 int day = (int)TimeUnit.SECONDS.toDays(seconds);        
2 long hours = TimeUnit.SECONDS.toHours(seconds) - (day *24);
3 long minute = TimeUnit.SECONDS.toMinutes(seconds) - (TimeUnit.SECONDS.toHours(seconds)* 60);
4 long second = TimeUnit.SECONDS.toSeconds(seconds) - (TimeUnit.SECONDS.toMinutes(seconds) *60);