Java yyyy format(java.util.Date date)

Here you can find the source of format(java.util.Date date)

Description

format

License

Apache License

Declaration

public static String format(java.util.Date date) 

Method Source Code

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

import java.text.SimpleDateFormat;

public class Main {
    public static String format(java.util.Date date) {
        return date == null ? "" : format(date, "yyyy-MM-dd");
    }//ww w. j a  va  2 s.  com

    public static String format(java.util.Date date, String pattern) {
        return date == null ? "" : new SimpleDateFormat(pattern).format(date);
    }
}

Related

  1. format(Date date, String pattern)
  2. format(Date pDt)
  3. format(final Date date, final String pattern)
  4. format(final java.util.Date date, final String sFormat)
  5. format(java.util.Date date)
  6. format(java.util.Date date, String pattern)
  7. format(Object value, String pattern)
  8. format(ResourceBundle idioma, Date date)
  9. format(String dateString)