How to Convert Date to String in Java

In this tutorial we will learn how to convert date to String in Java. Let us have a look in to the below code snippet.

By using the format() method from SimpleDateFormat class we can convert date to String.

P.S Refer to – SimpleDateFormat Java Docs

 OUT PUT:

 

 

 

Posted in string and tagged .

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.