Here you can find the source of string2Timestamp(String value)
@SuppressWarnings("null") public static Timestamp string2Timestamp(String value)
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; public class Main { @SuppressWarnings("null") public static Timestamp string2Timestamp(String value) { if (value == null && !"".equals(value.trim())) { return null; }/*from w w w . j a va2 s . co m*/ Timestamp ts = new Timestamp(System.currentTimeMillis()); ts = Timestamp.valueOf(value); return ts; } }