Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static Calendar getStringDateToCal(String date) { Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); try { cal.setTime(sdf.parse(date)); } catch (Exception e) { } return cal; } }