Java Parse Date parseDate(String date)

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

Description

Parses a date string to a Date instance using format "ddMMyyyy".

License

Open Source License

Parameter

Parameter Description
date a date string in "ddMMyyyy" format

Exception

Parameter Description
Exception to JUnit

Return

the corresponding Date instance.

Declaration

public static Date parseDate(String date) throws Exception 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    /**//ww  w  . j  av a  2s. c  o  m
     * <p>
     * Parses a date string to a Date instance using format "ddMMyyyy".
     * </p>
     *
     * @param date a date string in "ddMMyyyy" format
     *
     * @return the corresponding Date instance.
     *
     * @throws Exception to  JUnit
     */
    public static Date parseDate(String date) throws Exception {
        SimpleDateFormat format = new SimpleDateFormat("ddMMyyyy");

        return format.parse(date);
    }
}

Related

  1. parseDate(String date)
  2. parseDate(String date)
  3. parseDate(String date)
  4. parseDate(String date)
  5. parseDate(String date)
  6. parseDate(String date)
  7. parseDate(String date)
  8. parseDate(String date)
  9. parseDate(String date)