Here you can find the source of getTimestamp(String Str)
public static Timestamp getTimestamp(String Str)
//package com.java2s; import java.sql.Timestamp; public class Main { public static Timestamp getTimestamp(String Str) { Timestamp time = null;//from ww w . j av a2 s .c o m try { time = java.sql.Timestamp.valueOf(Str); } catch (Exception e) { System.out.println("getTimestamp error:" + e); } return time; } }