Here you can find the source of toYyyyMMddToDate(String date)
public static Date toYyyyMMddToDate(String date) throws ParseException
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private final static SimpleDateFormat yyyyMMdd = new SimpleDateFormat("yyyyMMdd"); public static Date toYyyyMMddToDate(String date) throws ParseException { return yyyyMMdd.parse(date); }//w ww . j a va 2s . c o m }