static valueOf(String s)
说明:将使用 JDBC 时间戳转义格式的 String 对象转换为 Timestamp 值。
返回:Timestamp
示例:
Timestamp date = Timestamp.valueOf("2018-12-12 00:00:00");
System.out.println(date);
输出结果:2018-12-12 00:00:00.0
说明:将使用 JDBC 时间戳转义格式的 String 对象转换为 Timestamp 值。
返回:Timestamp
Timestamp date = Timestamp.valueOf("2018-12-12 00:00:00");
System.out.println(date);
输出结果:2018-12-12 00:00:00.0