Android Long to Date Convert getDateTime(long microsecond)

Here you can find the source of getDateTime(long microsecond)

Description

get Date Time

Declaration

public static String getDateTime(long microsecond) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String getDateTime(long microsecond) {
        return getFormatDateTime(new Date(microsecond),
                "yyyy-MM-dd HH:mm:ss");
    }//from  ww  w .java  2 s  . c om

    public static String getFormatDateTime(Date date, String format) {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(date);
    }
}

Related

  1. generateFileName(long sysTime)
  2. getDateForMillis(final long tick)
  3. getDateLabel(long date)
  4. getDateString(long date, int style, Locale locale)
  5. getDateString(long time)
  6. getDateTime(long microsecond)
  7. getDateTimeForTimeZone(Long time)
  8. getDateTimeLabel(long time)
  9. getDateTimeString(long dateTime)