Here you can find the source of parseDate(String formattedDate)
public static Date parseDate(String formattedDate)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final String DATE_TIME_PATTERN = "yyyyMMddHHmmssSSS"; public static Date parseDate(String formattedDate) { Date parsedDate = null;//from w ww. j av a 2s . c om try { parsedDate = new SimpleDateFormat(DATE_TIME_PATTERN).parse(formattedDate); } catch (Exception e) { throw new RuntimeException( "Couldn't parse date: " + formattedDate + " using pattern '" + DATE_TIME_PATTERN + "'."); } return parsedDate; } }