Android Long to Date Convert longTimeToDate(long miliseconds)

Here you can find the source of longTimeToDate(long miliseconds)

Description

long Time To Date in format "yyyy-MM-dd HH:mm:ss"

Declaration

public static String longTimeToDate(long miliseconds) 

Method Source Code

//package com.java2s;
import java.text.DateFormat;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static final DateFormat AGO_FULL_DATE_FORMATTER = new SimpleDateFormat(
            "yyyy-MM-dd HH:mm:ss");

    public static String longTimeToDate(long miliseconds) {
        Date dt = new Date(miliseconds);
        return AGO_FULL_DATE_FORMATTER.format(dt);
    }//from  w w  w  .j  a v a 2  s  . com
}

Related

  1. hrColMinColSec(final long time, final boolean alwaysIncludeHours)
  2. isAtMostNMonthsAgo(long date, int howMany)
  3. isAtMostNWeeksAgo(long date, int howMany)
  4. isYesterday(long date)
  5. isYesterday(long date)
  6. longTimeToString(int i)
  7. longToCalendar(Long time)
  8. longToSqlDateFormat(long date)
  9. millisToLongDHMS(long duration)