Here you can find the source of parseYYYYMMDD(String yyyymmdd)
public static Date parseYYYYMMDD(String yyyymmdd)
//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); } } }