Java Parse Date Pattern YYYY parse(String param)

Here you can find the source of parse(String param)

Description

parse

License

Apache License

Declaration

public static Date parse(String param) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

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

    public static Date parse(String param) {
        Date date = null;//w  ww .  ja va2  s.c  om
        SimpleDateFormat sdf = new SimpleDateFormat(patternDate);
        try {
            date = sdf.parse(param);

        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return date;
    }
}

Related

  1. parse(String dateText)
  2. parse(String ds)
  3. parse(String format, String val)
  4. parse(String input)
  5. parse(String original)
  6. parse(String param)
  7. parse(String s)
  8. parse(String s)
  9. parse(String s)