Java Parse Date parseDate(String dateString, SimpleDateFormat simpleDateFormat)

Here you can find the source of parseDate(String dateString, SimpleDateFormat simpleDateFormat)

Description

parse Date

License

Open Source License

Declaration

public static Date parseDate(String dateString,
            SimpleDateFormat simpleDateFormat) 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 parseDate(String dateString,
            SimpleDateFormat simpleDateFormat) throws ParseException {
        if (dateString != null && dateString.length() > 0) {
            return simpleDateFormat.parse(dateString);
        } else {/*from  w w w  .  j av a2 s. c  o m*/
            return null;
        }
    }
}

Related

  1. parseDate(String dateString)
  2. parseDate(String dateString)
  3. parseDate(String dateString)
  4. parseDate(String dateString)
  5. parseDate(String dateString, Locale locale)
  6. parseDate(String dateString, String dateFormat)
  7. parseDate(String dateString, String format, TimeZone zone)
  8. parseDate(String dateString, String pattern)
  9. parseDate(String dateText)