Java Long Number to Date formatDateTime(long millis)

Here you can find the source of formatDateTime(long millis)

Description

format Date Time

License

Open Source License

Declaration

public static String formatDateTime(long millis) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

import java.util.Date;

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

    public static String formatDateTime(long millis) {
        Date resultdate = new Date(millis);
        return datetime.format(resultdate);
    }/*w w  w  .ja  v  a2s . c  o  m*/
}

Related

  1. formatDateHeader(long value)
  2. formatDateISO(long millis)
  3. formatDateTime(long d)
  4. formatDateTime(long d)
  5. formatDateTime(long date)
  6. formatDateTime(long time)
  7. formatDateTime(long timestampEpoch)
  8. formatDateTimeStamp(final long timeInMillis, final String dateFormatString)
  9. formateDate(Long date, String format)