Java Minute Get getMinutesSeconds(long millisec, String fmt)

Here you can find the source of getMinutesSeconds(long millisec, String fmt)

Description

get Minutes Seconds

License

Open Source License

Declaration

public static String getMinutesSeconds(long millisec, String fmt) 

Method Source Code

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

public class Main {

    public static String getMinutesSeconds(long millisec, String fmt) {
        long minutes = millisec / 1000 / 60;
        long seconds = (millisec - (minutes * 1000 * 60)) / 1000;
        if (fmt.isEmpty()) {
            fmt = "%d:%02d";
        }/*ww w.j av a2s . c  om*/
        return String.format(fmt, minutes, seconds);
    }
}

Related

  1. getMinutes(String time, int defaultValue)
  2. getMinutesDiff(long from, long to)
  3. getMinutesInSecWOHours(long sec)
  4. getMinutesOfTowDiffDate(String p_startDate, String p_endDate)
  5. getMinutesRapp(long microseconds)
  6. getMinutesSinceEpoch()
  7. getMinutesString(long time)
  8. getMinuteStart(long ts)
  9. getMinutesText(long minutes)