0

I have a date in this format dd/MM/yyyy and I want to convert in string format like this "mm name of the month yyyy".

For example I have 25/02/2019 and I want an output like this "25 February 2019" in java 7.

How can I do?

travis_91
  • 171
  • 2
  • 13
  • String --parse--> Date --format--> String – Michael Feb 25 '19 at 15:49
  • With java 8 you can use `yourDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"))` – Lino Feb 25 '19 at 15:52
  • 1
    When using Java 7 consider using [ThreeTen Backport](https://www.threeten.org/threetenbp/), the backport of java.time, the modern Java date and time API, to Java 6 and 7. It’s the future-proof and programmer-friendly solution. Look into classes `LocalDate` and `DateTimeFormatter`.' – Ole V.V. Feb 25 '19 at 16:08
  • I found this solution: SimpleDateFormat sdf = new SimpleDateFormat("dd MMMM yyyy"); that works for me – travis_91 Feb 26 '19 at 07:51

0 Answers0