Java Second Convert secondsToString(long seconds)

Here you can find the source of secondsToString(long seconds)

Description

seconds To String

License

Open Source License

Declaration

public static String secondsToString(long seconds) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String secondsToString(long seconds) {
        long h = seconds / 3600;
        long m = (seconds - (h * 3600)) / 60;
        long s = seconds - (h * 3600) - (m * 60);

        return String.format("%02d:%02d:%02d", h, m, s);
    }//from   w  w w  . ja  v  a 2  s .  c  o m
}

Related

  1. secondsToHours(int s)
  2. secondsToInternal(int seconds)
  3. secondsToNanoseconds(long seconds)
  4. secondsToReadableBiggest(int seconds)
  5. secondsToString(int seconds)
  6. SecondsToString(long seconds)
  7. secondsToString(long seconds)
  8. secondsToString(long time)
  9. secondsToStringWithUnits(double value)