Java Date to String date2Str(Date value)

Here you can find the source of date2Str(Date value)

Description

date Str

License

Apache License

Declaration

private static String date2Str(Date value) 

Method Source Code

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

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

public class Main {

    private static String date2Str(Date value) {
        if (value == null)
            return null;
        //if(defaultsdf==null)defaultsdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(value);
    }/*from  ww  w  .  jav a2 s . com*/
}

Related

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