Looks like that from the pattern, but you haven't shown us any input example.
That issue has been successfully implemented.
Date class which is provided by the java.
In my project I am saving milliseconds in a sqllite databse, by default I am saving System.
Here we also discuss the introduction and how to convert timestamp to date in java along with examples.
You can further change ChronoUnit to to get the difference in terms of months, years, hours or any other time units.