Parse a String to a Timestamp 2.1. Standard Format. The simplest way to parse a String to a Timestamp is its valueOf method: Timestamp.valueOf("2018-11-12 01:02:03.123456789") ... 2.2. Alternative Formats. Now, if it isn't in JDBC timestamp format, then luckily, valueOf also takes a LocalDateTime instance. May 6, 2023