Top "Java-time" questions

The java.

How to parse/format dates with LocalDateTime? (Java 8)

Java 8 added a new java.time API for working with dates and times (JSR 310). I have date and time as …

java datetime java-8 timestamp java-time
Convert java.util.Date to java.time.LocalDate

What is the best way to convert a java.util.Date object to the new JDK 8/JSR-310 java.time.LocalDate? …

java datetime java-8 java-time
Converting between java.time.LocalDateTime and java.util.Date

Java 8 has a completely new API for date and time. One of the most useful classes in this API is …

java datetime java-8 java-time
Convert java.time.LocalDate into java.util.Date type

I want to convert java.time.LocalDate into java.util.Date type. Because I want to set the date into …

java java-8 java-time
How to get milliseconds from LocalDateTime in Java 8

I am wondering if there is a way to get current milliseconds since 1-1-1970 (epoch) using the new LocalDate, …

java datetime java-8 milliseconds java-time
serialize/deserialize java 8 java.time with Jackson JSON mapper

How do I use Jackson JSON mapper with Java 8 LocalDateTime? org.codehaus.jackson.map.JsonMappingException: Can not instantiate value of …

jackson java-time
Calculate days between two dates in Java 8

I know there are lots of questions on SO about how to get, but I want and example using new …

java java-8 java-time days date-difference
How do I add one month to current date in Java?

In Java how can I add one month to the current date?

java java-time
Format Instant to String

I'm trying to format an Instant to a String using the new java 8 time-api and a pattern: Instant instant = ...; String …

java datetime java-8 datetime-format java-time
How can I create a Java 8 LocalDate from a long Epoch time in Milliseconds?

I have an external API that returns me dates as longs, represented as milliseconds since the beginning of the Epoch. …

java datetime java-8 java-time