Java Parse Date parseDate(final String date)

Here you can find the source of parseDate(final String date)

Description

parse Date

License

MIT License

Parameter

Parameter Description
date a parameter

Exception

Parameter Description
ParseException an exception

Return

parsed Date object

Declaration

static Date parseDate(final String date) throws ParseException 

Method Source Code


//package com.java2s;
/*/*from  www .j  ava 2s  .c  o  m*/
 * libChEBIj (c) University of Manchester 2015
 *
 * libChEBIj is licensed under the MIT License.
 * 
 * To view a copy of this license, visit <http://opensource.org/licenses/MIT/>.
 */

import java.text.*;
import java.util.*;

public class Main {
    /**
     * 
     */
    private static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH);

    /**
     * 
     * @param date
     * @return parsed Date object
     * @throws ParseException
     */
    static Date parseDate(final String date) throws ParseException {
        return dateFormat.parse(date);
    }
}

Related

  1. parseDate(Date date, String format)
  2. parseDate(Date date, String pattern)
  3. parseDate(DateFormat df, String dateStr)
  4. parseDate(DateFormat f, String date)
  5. parseDate(final Date date)
  6. parseDate(final String date)
  7. parseDate(final String date)
  8. parseDate(final String date)
  9. parseDate(final String date, final List patterns)