Java Long Number to Time convertTime(long time)

Here you can find the source of convertTime(long time)

Description

convert Time

License

Open Source License

Declaration

public static String convertTime(long time) 

Method Source Code

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

public class Main {
    public static String convertTime(long time) {
        double h = time / 3600000.0;
        double m = (h - Math.floor(h)) * 60.0;
        double s = (m - Math.floor(m)) * 60;

        //        return String.format("%02d:%02d:%02d", hour, minutes, seconds);
        return String.format("%s%02d:%02d", (((int) h > 0) ? String.format("%02d:", (int) h) : ""), (int) m,
                (int) s);
    }//from  www.jav  a2s .  c  o m
}

Related

  1. convertMillsToDateString(long currentTimeMillis)
  2. convertTime(long difference)
  3. convertTime(Long time)
  4. convertTime(long time)
  5. convertTime(long time)
  6. convertTime(long time)
  7. convertTime(long value)
  8. convertTime(long x)
  9. convertTimestampToSec(long timestampInMs)