Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static Calendar dateToCalendar(String date) { String[] theDate = date.split(" "); Calendar calDate = Calendar.getInstance(); calDate.set(Integer.parseInt(theDate[0]), Integer.parseInt(theDate[1]) - 1, Integer.parseInt(theDate[2]), Integer.parseInt(theDate[3]), Integer.parseInt(theDate[4]), Integer.parseInt(theDate[5])); return calDate; } }