Java Date Parse convertStringToDate(String dateString, String dateFormat)

Here you can find the source of convertStringToDate(String dateString, String dateFormat)

Description

convert String To Date

License

Apache License

Declaration

public static Date convertStringToDate(String dateString,
            String dateFormat) throws ParseException 

Method Source Code

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

import java.text.ParseException;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static Date convertStringToDate(String dateString,
            String dateFormat) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
        return sdf.parse(dateString);
    }//from  www .j  a va2  s  .  c o  m
}

Related

  1. convertStringToDate(String dateAsString)
  2. convertStringToDate(String dateFormat, String date)
  3. convertStringToDate(String dateInput, String formatter)
  4. convertStringToDate(String dateStr, String format)
  5. convertStringToDate(String dateStr, String pattern)
  6. convertStringToDate(String dateString, String dateFormat)
  7. convertStringToDate(String dateString, String pattern)
  8. convertStringToDate(String dateText)
  9. convertStringToDate(String dateTime)