Java Year Parse parseYYYYMMDD(String yyyymmdd)

Here you can find the source of parseYYYYMMDD(String yyyymmdd)

Description

parse YYYYMMDD

License

Open Source License

Declaration

public static Date parseYYYYMMDD(String yyyymmdd) 

Method Source Code

//package com.java2s;
/**/*  ww  w  . ja  va  2 s  .c  o  m*/
 * Copyright (c) 2008 OpenSprout Team.
 * 
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 */

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static Date parseYYYYMMDD(String yyyymmdd) {
        SimpleDateFormat sformat = new SimpleDateFormat("yyyyMMdd");
        try {
            return sformat.parse(yyyymmdd);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. parseDdMmYyyyDate(String date)
  2. parseTimeByYYYYMMDDHHMMSS(String str)
  3. parseYYYYMMDD(String s)
  4. parseYYYYMMDD(String yyyyDashmmDashdd)
  5. parseYYYYMMDD(String yyyymmdd)