Java Timestamp toLocalDateTime() MethodThe toLocalDateTime() method of Timestamp class converts this Timespan object to a LocalDateTime which represents the same date-time value as this Timestamp. SyntaxParametersNA ReturnsThe toLocalDateTime () method of Timestamp class returns a LocalDateTime object which represents the same date-time value as this Timestamp. Example 1Test it NowOutput: Timestamp : 2018-09-01 09:01:15.0 LocalDateTime : 2018-09-01T09:01:15 Example 2Test it NowOutput: Timestamp : 2018-09-06 11:00:42.26 Current LocalDateTime : 2018-09-06T11:00:42.260
Next TopicJava Timestamp
|