Similar to converting a string to a date, this example will show how to convert a string into a java.sql.Timestamp. First using SimpleDateFormat we will establish a pattern which we expect the string to be in when we parse it. Next calling the SimpleDateFormat.parse we will convert the string into a java.util.Date. Passing the milliseconds to a constructor of Timestamp we will initialize a new instance.