Android Date String to Date Convert fromStringUS(String dateString)

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

Description

from String US

License

Open Source License

Declaration

public static Date fromStringUS(String dateString)
            throws ParseException 

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 final String DATE_FORMAT_MM_dd_yyyy = "MM/dd/yyyy";

    public static Date fromStringUS(String dateString)
            throws ParseException {
        return fromString(dateString, DATE_FORMAT_MM_dd_yyyy);
    }//from w  w  w  . j  a v a 2 s.  co  m

    public static Date fromString(String dateString, String format)
            throws ParseException {
        SimpleDateFormat inputFormat = new SimpleDateFormat(format);
        return inputFormat.parse(dateString);
    }
}

Related

  1. ParseDate(String str)
  2. ParseUTCDate(String str)
  3. formatToDate(String date)
  4. fromStringFR(String dateString)
  5. getDateFromString(String dateString, String dateFormat)
  6. getDefaultDateTimeString(String date, Locale locale)
  7. getShortDateTimeString(String date, Locale locale)
  8. iso8601ToTimestamp(final String strDate)