Java Date to String date2string(Date date)

Here you can find the source of date2string(Date date)

Description

datestring

License

Apache License

Declaration

public static String date2string(Date date) 

Method Source Code

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

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class Main {
    public static String date2string(Date date) {
        SimpleDateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss Z yyyy", Locale.ENGLISH);
        //df.setTimeZone(TimeZone.getTimeZone("GMT+08:00"));
        String sendtime = df.format(date);
        //String sendtime = date.toString();
        return sendtime;
    }/*from  w w  w.j  a  va  2 s . c om*/
}

Related

  1. date2Str(Date date, String pattern)
  2. date2Str(Date value)
  3. date2Str(final Date date, final String dateFormat)
  4. date2Str(SimpleDateFormat date_sdf)
  5. date2string(Date _aDate)
  6. date2String(Date date)
  7. date2String(Date date)
  8. date2string(Date date)
  9. date2String(Date date)