Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date convertStringToDateSimple(String date) { //Log("afaLog", "DATA SAIDA" + date); Date result = null; SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); String data = date.replace(" 00:00:00", ""); try { result = format.parse(date); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return result; } }