Java Date to String dateToString(Date date)

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

Description

Converts a Date to a String with format DateUtils.DATE_FORMAT.

License

Educational Community License

Declaration

public static String dateToString(Date date) 

Method Source Code

//package com.java2s;
//License from project: Educational Community License 

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

public class Main {
    private static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat(
            "yyyy-MM-dd");

    /**// w  w w  .  j  ava 2 s . c  om
     * Converts a Date to a String with format DateUtils.DATE_FORMAT.
     */
    public static String dateToString(Date date) {
        return date == null ? null : DATE_FORMAT.format(date);
    }
}

Related

  1. dateToString(Date date)
  2. dateToString(Date date)
  3. dateToString(Date date)
  4. dateToString(Date date)
  5. dateToString(Date date)
  6. dateToString(Date date)
  7. dateToString(Date date)
  8. dateToString(Date date)
  9. dateToString(Date date)