Conversion New and Old Date Time API in Java 8

To interoperate with Legacy Date API from java.util.Date from java 1 and this new date API from java 8. We get several methods for that.

1) java.time.Instant and java.util.Date Conversion example

 

2) java.time.Instant and java.sql.Timestamp Conversion example

 

3) java.time.LocalDate and java.util.Date Conversion example

4) java.time.LocalTime and java.sql.Time Conversion example

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *