Java Date Parse convertStringToDate(String strDate, String parseFormat)

Here you can find the source of convertStringToDate(String strDate, String parseFormat)

Description

convert String To Date

License

Apache License

Declaration

public static Date convertStringToDate(String strDate, String parseFormat) 

Method Source Code

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

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static Date convertStringToDate(String strDate, String parseFormat) {
        try {//from  ww  w.  ja  v a2 s  .  c  om
            return new SimpleDateFormat(parseFormat).parse(strDate);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}

Related

  1. convertStringToDate(String s)
  2. convertStringToDate(String str)
  3. convertStringToDate(String str, String pattern)
  4. convertStringToDate(String str_date)
  5. convertStringToDate(String strDate)
  6. convertStringToDate(String stringDate, String pattern)
  7. convertStringToDate(String value)
  8. convertStringToDateTimeNotException(String date)
  9. convertStringToDateWithRFC1123(final String dateTime)