public static Timestamp toTimestamp(String string){
  if (string == null)   return null;
 else   try {
    return Timestamp.valueOf(string);
  }
 catch (  Throwable t) {
    return null;
  }
}

public static Timestamp toTimestamp ( String string ) { if ( string == null ) return null ; else try { return Timestamp . valueOf ( string ) ; } catch ( Throwable t ) { return null ; } }
return timestamp value using a string . null or conversion error returns null .
