Java Parse Date Pattern YYYY parseStringToUtilDate(String strDate)

Here you can find the source of parseStringToUtilDate(String strDate)

Description

parse String To Util Date

License

Open Source License

Declaration

public static java.util.Date parseStringToUtilDate(String strDate) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

public class Main {
    public static java.util.Date parseStringToUtilDate(String strDate) {

        java.util.Date date = null;
        try {//from w  w  w.j  a  va  2s.c o m
            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
            date = df.parse(strDate);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return date;
    }
}

Related

  1. parseStringToCalendar(String strDate)
  2. parseStringToDate(final String pDate, final String... pFormat)
  3. parseStringToDate(String date)
  4. parseStringToDate(String dateString)
  5. parseStringToDatePrettyPrint(Date date)
  6. parseTIPPDate(String dateString)
  7. parseToDate(final String date, final String format)
  8. parseToDate(String date)
  9. parseToDate(String date, String format)