I have a string date, and I convert it with statement below:
LocalDateTime datetime = LocalDateTime.parse(rs.getString("DateIn"), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss"));
Now I want to convert datetime
into Date
for comparison purpose, how to convert it?
Date convertedDatetime = Date.from(datetime.atZone(ZoneId.systemDefault()).toInstant());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With