Android Second Format formatIntoHHMMSS(int secsIn)

Here you can find the source of formatIntoHHMMSS(int secsIn)

Description

format Into HHMMSS

Declaration

public static String formatIntoHHMMSS(int secsIn) 

Method Source Code

//package com.java2s;

public class Main {
    public static String formatIntoHHMMSS(int secsIn) {
        int hours = secsIn / 3600, remainder = secsIn % 3600, minutes = remainder / 60, seconds = remainder % 60;

        return ((hours < 10 ? "0" : "") + hours + ":"
                + (minutes < 10 ? "0" : "") + minutes + ":"
                + (seconds < 10 ? "0" : "") + seconds);
    }/*from   www .  ja  v  a2s .c  o m*/
}

Related

  1. formatTime(int second)
  2. formatTime(int second)
  3. getTimeFormattedFromSeconds(int seconds)
  4. formatElapsedTime(long elapsedSeconds)
  5. formatElapsedTime(StringBuilder recycle, long elapsedSeconds)
  6. formatElapsedTime(StringBuilder recycle, String format, long minutes, long seconds)