Android Long to Date Convert convertToTime(long time)

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

Description

convert To Time

Declaration

public static String convertToTime(long time) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String convertToTime(long time) {
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = new Date(time);
        return df.format(date);
    }/* w  ww  .  j av  a2s  .c  o m*/
}

Related

  1. stdDateFormat(long t)
  2. formatElapsedTime(long totalTimeSeconds)
  3. formatSecondsToHHMM(long seconds)
  4. getStringByFormat(long milliseconds, String format)
  5. getStringByFormat(long milliseconds, String format)
  6. formatDateTime(long timeToFormatInMilliseconds)
  7. getElapsed(long start, long end)