Android Long to Date Convert dateUtil(long date)

Here you can find the source of dateUtil(long date)

Description

date Util

Declaration

public static String dateUtil(long date) 

Method Source Code

//package com.java2s;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static String dateUtil(long date) {
        Date d = new Date();
        d.setTime(date);/* www .  j a va2s  .  c o m*/
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",
                java.util.Locale.getDefault());
        String str = sdf.format(d);
        return str;
    }
}

Related

  1. convertToDateStamp(long time)
  2. convertToTimeStamp(long time)
  3. convertToTimeStamp(long time, boolean showSeconds)
  4. dateFromUnixTimestamp(final long unixTimestamp)
  5. dateFromUtc(long milliseconds)
  6. daysSinceTimestamp(long timestamp)
  7. encodeDate(long date)
  8. format(String aFormat, long aDate)
  9. formatDuration(Context context, long millis)