Java Year Parse parseDdMmYyyyDate(String date)

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

Description

parse Dd Mm Yyyy Date

License

Open Source License

Declaration

public static Date parseDdMmYyyyDate(String date) throws ParseException 

Method Source Code

//package com.java2s;
/**/*from  www.  j av a2s. c  om*/
 *     This file is part of the Squashtest platform.
 *     Copyright (C) 2010 - 2016 Henix, henix.fr
 *
 *     See the NOTICE file distributed with this work for additional
 *     information regarding copyright ownership.
 *
 *     This is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU Lesser General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     this software is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU Lesser General Public License for more details.
 *
 *     You should have received a copy of the GNU Lesser General Public License
 *     along with this software.  If not, see <http://www.gnu.org/licenses/>.
 */

import java.text.ParseException;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static final String DD_MM_YYYY_DATE = "dd/MM/yyyy";

    public static Date parseDdMmYyyyDate(String date) throws ParseException {
        return parseDate(date, DD_MM_YYYY_DATE);
    }

    private static Date parseDate(String strDatetime, String format) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.parse(strDatetime);
    }
}

Related

  1. parseDateSlashedMmDdYyyy(String dateStr)
  2. parseDateTime_mmddyyyy(String s)
  3. parseDateyyyy_MM_DD2(String ds)
  4. parseDateyyyyMMdd(String value)
  5. parseddMMyyyy(String dateStr)
  6. parseTimeByYYYYMMDDHHMMSS(String str)
  7. parseYYYYMMDD(String s)
  8. parseYYYYMMDD(String yyyyDashmmDashdd)
  9. parseYYYYMMDD(String yyyymmdd)