Android Long to Date Convert transMillionToTime(long milliseconds)

Here you can find the source of transMillionToTime(long milliseconds)

Description

trans Million To Time

Declaration

public static String transMillionToTime(long milliseconds) 

Method Source Code

//package com.java2s;

public class Main {
    public static String transMillionToTime(long milliseconds) {
        int seconds = (int) milliseconds / 1000;
        int minute = seconds / 60;
        int second = seconds % 60;
        String minStr = minute < 10 ? "0" + minute : String.valueOf(minute);
        String secStr = second < 10 ? "0" + second : String.valueOf(second);
        String time = minStr + ":" + secStr;
        return time;
    }/*from ww  w  . jav  a  2s .co m*/
}

Related

  1. getTimeStringFrom(long timestamp)
  2. humanFriendlyDate(long time)
  3. longToDate(long timestamp)
  4. millToDate(Long mill)
  5. toDateFromTimestamp(long date)
  6. transformDateTime(long t)
  7. millis2cal(long milliseconds, boolean clearTime)
  8. millisToString(long l)
  9. stdDateFormat(long t)