Java tutorial
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date convertStringToDate(String dateString) { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-ddTHH:mm:ss"); Date date = null; try { date = format.parse(dateString); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } return date; } }