Java String to Date StrToDate(String dateFormat)

Here you can find the source of StrToDate(String dateFormat)

Description

Str To Date

License

Open Source License

Declaration

public static Date StrToDate(String dateFormat) 

Method Source Code

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

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

public class Main {
    public static Date StrToDate(String dateFormat) {
        SimpleDateFormat formatter = new SimpleDateFormat("EEEE, MMM dd, yyyy HH:mm:ss a");
        try {//from   www.j  a  v  a2s .c om
            return formatter.parse(dateFormat);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }
}

Related

  1. strToDate(final String str)
  2. strToDate(String _date, String format)
  3. strToDate(String date)
  4. strToDate(String date)
  5. strToDate(String date, String pattern)
  6. strToDate(String dateInString)
  7. strToDate(String dateStr, String dateFormat)
  8. strToDate(String dateStr, String format)
  9. strToDate(String format, String dateStr)