Here you can find the source of stringToTimestamp(String value)
public static Timestamp stringToTimestamp(String value)
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; public class Main { public static Timestamp stringToTimestamp(String value) { try {//from www.j ava 2s. c o m return Timestamp.valueOf(value); } catch (Exception e) { return new Timestamp(new java.util.Date().getTime()); } } }