Java Minute Get getMinutesRapp(long microseconds)

Here you can find the source of getMinutesRapp(long microseconds)

Description

Returns rappresentation of time in 00:00 format

License

Apache License

Parameter

Parameter Description
microseconds a parameter

Declaration

public static String getMinutesRapp(long microseconds) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//from   w  w  w  .j  ava 2 s. com
     * Returns rappresentation of time in 00:00 format
     *
     * @param microseconds
     * @return
     */
    public static String getMinutesRapp(long microseconds) {
        int sec = (int) (microseconds / 1000000);
        int min = sec / 60;
        sec = sec % 60;
        String ms = min + "";
        String ss = sec + "";
        if (ms.length() < 2) {
            ms = "0" + ms;
        }
        if (ss.length() < 2) {
            ss = "0" + ss;
        }
        return ms + ":" + ss;
    }
}

Related

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