Java Parse Date Pattern YYYY parse(Date d)

Here you can find the source of parse(Date d)

Description

parse

License

Open Source License

Declaration

public static String parse(Date d) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String parse(Date d) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
        String dateStr = sdf.format(d);
        return dateStr;
    }//from   w w  w . j  av a  2  s. c o  m
}

Related

  1. parse(Class clazz, Object object)
  2. parse(Date strDate, String pattern)
  3. parse(final String dateString)
  4. parse(final String inputDate)
  5. parse(final String s)