Android Long to Date Convert getDateTimeString(long time_milis)

Here you can find the source of getDateTimeString(long time_milis)

Description

get Date Time String

Declaration

public static String getDateTimeString(long time_milis) 

Method Source Code

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

import java.util.Date;

public class Main {
    public static String getDateTimeString(long time_milis) {
        SimpleDateFormat sdf = getSimpleDateFormat();
        return sdf.format(new Date(time_milis));
    }/* w w  w. ja  va  2s.  c  om*/

    public static SimpleDateFormat getSimpleDateFormat() {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
    }
}

Related

  1. isTomorrow(long lTime)
  2. getActivityTime(long startTime, long endTime)
  3. getDate(long timeStamp)
  4. getDateFrom(long timestamp, Context context)
  5. getDateFromLong(long dateLong)
  6. formatTime(long timeInMillis)
  7. formatDate(long timeInMillis)
  8. getCurrentDate(long time)
  9. changeMillisToFormat(long milliseconds, String pattern)