Here you can find the source of stringToDate(String dta)
public static java.sql.Date stringToDate(String dta)
//package com.java2s; //License from project: Apache License public class Main { public static java.sql.Date stringToDate(String dta) { java.sql.Date data;/*w ww. ja va 2 s. co m*/ int dia = Integer.parseInt(dta.substring(0, 2)); int mes = Integer.parseInt(dta.substring(3, 5)); int ano = Integer.parseInt(dta.substring(6, 10)); data = new java.sql.Date(ano - 1900, mes - 1, dia); return data; } }