Java Millisecond Convert getTimeByMillis(long now)

Here you can find the source of getTimeByMillis(long now)

Description

get Time By Millis

License

Open Source License

Declaration

public static String getTimeByMillis(long now) throws ParseException 

Method Source Code


//package com.java2s;
import java.text.*;
import java.util.*;

public class Main {
    public static String getTimeByMillis(long now) throws ParseException {
        DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(now);/*www. jav  a2  s  . c om*/
        return formatter.format(calendar.getTimeInMillis());
    }
}

Related

  1. getHumanDisplayForTimediff(Long diffMillis)
  2. getNice(long timeMillisecGMT)
  3. getStringFromMillis(long timestamp)
  4. getTime(long millis)
  5. getTime(long time, boolean withMilliseconds)
  6. getTimeFromMillisAsNICSDate(long timeInMillis)
  7. getTimeInMillisFromNicsDateString(String dateString)
  8. getTimeMillis(String dateStr)
  9. getTimeMillis(String time)