Here you can find the source of parseDate(String partten, String datatime)
public static Calendar parseDate(String partten, String datatime) throws ParseException
//package com.java2s; // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt import java.text.ParseException; import java.util.Calendar; public class Main { public static Calendar parseDate(String partten, String datatime) throws ParseException { java.text.SimpleDateFormat format = new java.text.SimpleDateFormat(partten); format.parse(datatime);//from w w w . j a va 2s . c o m return format.getCalendar(); } }