Java Milliseconds toTime(long milli)

Here you can find the source of toTime(long milli)

Description

to Time

License

Open Source License

Declaration

public static String toTime(long milli) 

Method Source Code


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

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main {
    public static String toTime(long milli) {
        Calendar date = Calendar.getInstance();
        date.setTimeInMillis(milli);/*w  w  w.j  a v a2 s  .c o m*/
        DateFormat format = new SimpleDateFormat("HH:mm:ss");
        return format.format(date.getTime());
    }
}

Related

  1. timeToString(long timeMillis)
  2. timeToTag(long milliSeconds)
  3. toMillis(String ts)
  4. toSpacelessDateString(long millisSinceEpoch)
  5. ToSting(Long milliSecond)
  6. truncateMillisecond(Date date)
  7. trySleepMillis(int millis)
  8. unixToDosTime(long timeMillis)
  9. waitMillis(long millis)