Here you can find the source of parseYYYYMMDD(String s)
public static Date parseYYYYMMDD(String s)
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static SimpleDateFormat yyyymmdd = new SimpleDateFormat( "yyyyMMdd"); public static Date parseYYYYMMDD(String s) { try {/*from ww w. j a va 2 s. c o m*/ return (s == null) ? null : yyyymmdd.parse(s); } catch (ParseException e) { throw new RuntimeException(e); } } }