Android Date String to Date Convert convertDateStringToDate(String dateString)

Here you can find the source of convertDateStringToDate(String dateString)

Description

convert Date String To Date

Declaration

public static Date convertDateStringToDate(String dateString)
            throws ParseException 

Method Source Code

//package com.java2s;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class Main {
    public static Date convertDateStringToDate(String dateString)
            throws ParseException {
        SimpleDateFormat dateFormat = new SimpleDateFormat(
                "yyyy-MM-dd HH:mm:ss", Locale.getDefault());
        return dateFormat.parse(dateString);
    }//from   w w  w.  j  a va  2  s.co m
}

Related

  1. formatDate(String date)
  2. changeStringToDate(String fecha, String pattern)
  3. changeStringToDate1(String str)
  4. changeStringToDate2(String str)
  5. changeStringToDate3(String str)
  6. string2Date(String s, String s1)
  7. stringToDate(SimpleDateFormat dateFormat, String dateToConvert, boolean catchError)
  8. stringToDate(String paramString1, String paramString2, boolean paramBoolean)
  9. toDate(String s)