Archives: Date Time

Java – Convert LocalDateTime to Util Date

Convert Java 8 LocalDateTime to Util Date Object Example

Output:

date===> Wed Feb 10 17:48:18 IST 2016


Java – Calculate Difference Between Two Dates Using Joda Time

Take a look @ Joda-Time FAQ

You can use a PeriodFormatter to get the format of your choice.

Try the following sample code.



Java JSP – JSTL Date Format Example

This example show how to format date in JSP using format tag library.