Java String to Date strToDate(String _date, String format)

Here you can find the source of strToDate(String _date, String format)

Description

str To Date

License

Open Source License

Declaration

public static Date strToDate(String _date, String format) throws ParseException 

Method Source Code


//package com.java2s;
import java.text.ParseException;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static Date strToDate(String _date, String format) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.parse(_date);
    }/* w w w . j av  a 2 s . com*/
}

Related

  1. stringToDatetime(String string)
  2. stringToDateTime(String stringDate, String format)
  3. stringToDateWithFormat(String stringToConvert, String dateFormat)
  4. strMSShortToDate(String str_date)
  5. strToDate(final String str)
  6. strToDate(String date)
  7. strToDate(String date)
  8. strToDate(String date, String pattern)
  9. StrToDate(String dateFormat)