Java Parse Date parseDate(String sDate)

Here you can find the source of parseDate(String sDate)

Description

parse Date

License

Open Source License

Declaration

public static Date parseDate(String sDate) 

Method Source Code


//package com.java2s;
import java.text.*;
import java.util.*;

public class Main {
    public static Date parseDate(String sDate) {
        SimpleDateFormat bartDateFormat = new SimpleDateFormat("yyyy-MM-dd");

        try {/*from   w w  w  .  j  a  v a 2 s  . c  o  m*/
            Date date = bartDateFormat.parse(sDate);
            return date;
        } catch (Exception ex) {
        }
        return null;
    }
}

Related

  1. parseDate(String s)
  2. parsedate(String s, SimpleDateFormat fmt)
  3. parseDate(String s, String format)
  4. parseDate(String sDate)
  5. parseDate(String sDate)
  6. parseDate(String sDate, Locale locale)
  7. parseDate(String sDate, SimpleDateFormat _dateFormat)
  8. parseDate(String sDate, String sFormat)
  9. parseDate(String sDate, String sSourceFormat, String sDestinationFormat)