Java String to Date toDateString(Date date)

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

Description

to Date String

License

Apache License

Declaration

public static String toDateString(Date date) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static final String Format_Date = "yyyy-MM-dd";

    public static String toDateString(Date date) {
        if (date == null) {
            return "";
        }/*from w w  w  . j a  v  a  2s  . c  o  m*/
        return new SimpleDateFormat(Format_Date).format(date);
    }
}

Related

  1. toDateFormat(String date)
  2. toDateFormat(String dateFormat, TimeZone tz, Locale locale)
  3. toDateOracle(Date d, String format, String hqlFormat)
  4. toDates(DateFormat format, String[] values)
  5. toDateString(Calendar cal)
  6. toDateString(Date date)
  7. toDateString(Date date)
  8. toDateString(Date date, String format)
  9. toDateString(Date date, String format)