Java tutorial
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date dateXMLStringToDateControlador(SimpleDateFormat formatter, String sDate) { Date date = null; try { date = formatter.parse(sDate); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } return date; } }