Java Long Number to Date dateToString(long date)

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

Description

date To String

License

Apache License

Declaration

static String dateToString(long date) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.Format;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static final ThreadLocal<Format> DATE_FORMAT = new ThreadLocal<Format>() {
        @Override/*from  w  ww.j  a  v a 2 s  .  c o m*/
        protected Format initialValue() {
            return new SimpleDateFormat("yyyy-MM-dd hh:mm a");
        }
    };

    static String dateToString(long date) {
        return DATE_FORMAT.get().format(new Date(date));
    }
}

Related

  1. dateToAPODString(long date)
  2. dateToLong(String date)
  3. dateToPGNDate(long when)
  4. dateToString(long date)
  5. dateToString(long date)
  6. dateToString(long date)
  7. dateToString(long date, String formate)
  8. dateToStrLong(java.util.Date dateDate, String format)
  9. format(long date)