SimpleDateFormat (Parse Date)

Date conversions are very common scenarios in any application.,

Java Provides SimpleDateFormat class for String to Date, Date to String conversions.

The below example shows

  • How String format can be converted to Date Format.
  • How to find difference between 2 Dates.

Code:

Output

Leave a Reply

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