SimpleDateFormat will not work if he/she is starting with LocalDate, which is new in Java 8. From what I can see, you will have to use DateTimeFormatter.
LocalDate localDate = LocalDate.now(); // For reference
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd LLLL yyyy");
String formattedString = localDate.format(formatter);
That should print 05 May 1988. To get the period (AKA full stop) after the day and before the month, you might have to use "dd'.LLLL yyyy".
Answer from ProgrammersBlock on Stack OverflowBaeldung
baeldung.com › home › java › java dates › creating a localdate with values in java
Creating a LocalDate with Values in Java | Baeldung
January 8, 2024 - Creating a date in Java had been redefined with the advent of Java 8. Besides, the new Date & Time API from the java.time package can be used with ease relative to the old one from the java.util package. In this tutorial, we’ll see how it makes a huge difference. The LocalDate class from the java.time package helps us achieve this.
Videos
11:15
Java basics of the LocalDate, LocalTime, LocalDateTime, ZonedDateTime ...
11:06
Java LocalDate - YouTube
05:22
LocalDate class in Java | How to create a Java LocalDate | Java ...
03:44
LocalDate in Java - Learn Programming | Programming Tutorial - YouTube
05:26
#1. Learn About LocalDate of Java in 5 Minutes - YouTube
05:21
Java 8 LocalDate Class Introduction | Java Date and Time | Java ...
Oracle
docs.oracle.com › javase › 8 › docs › api › java › time › LocalDate.html
LocalDate (Java Platform SE 8 )
1 week ago - LocalDate is an immutable date-time object that represents a date, often viewed as year-month-day. Other date fields, such as day-of-year, day-of-week and week-of-year, can also be accessed. For example, the value "2nd October 2007" can be stored in a LocalDate.
Java Code Geeks
examples.javacodegeeks.com › home › java development › core java
Java LocalDate Example - Java Code Geeks
July 23, 2021 - Let us look at some examples for ... main(String args[]){ LocalDate localDate1 = LocalDate.now(); System.out.println("Current date: "+localDate1); LocalDate localDate2 = LocalDate.of(2020, 06, 9); System.out.println("Current ...
TutorialsPoint
tutorialspoint.com › javatime › javatime_localdate_now.htm
java.time.LocalDate.now() Method Example
package com.tutorialspoint; import java.time.LocalDate; public class LocalDateDemo { public static void main(String[] args) { LocalDate date = LocalDate.now(); System.out.println(date); } }
Top answer 1 of 8
493
SimpleDateFormat will not work if he/she is starting with LocalDate, which is new in Java 8. From what I can see, you will have to use DateTimeFormatter.
LocalDate localDate = LocalDate.now(); // For reference
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd LLLL yyyy");
String formattedString = localDate.format(formatter);
That should print 05 May 1988. To get the period (AKA full stop) after the day and before the month, you might have to use "dd'.LLLL yyyy".
2 of 8
118
It could be short as:
LocalDate.now().format(DateTimeFormatter.ofPattern("dd/MM/yyyy"));
Javabrahman
javabrahman.com › java-8 › java-8-working-with-localdate-localtime-localdatetime-tutorial-with-examples
Java 8 - Working with LocalDate, LocalTime, LocalDateTime
December 12, 2016 - LocalDate has the default format ‘YYYY-MM-DD’ as in ‘2016-12-12’. java.time.LocalTime: A LocalTime holds time in the ISO-8601 calendar system, without any date or time zone information associated with it.
Oracle
docs.oracle.com › en › java › javase › 24 › docs › api › java.base › java › time › LocalDate.html
LocalDate (Java SE 24 & JDK 24)
July 15, 2025 - LocalDate is an immutable date-time object that represents a date, often viewed as year-month-day. Other date fields, such as day-of-year, day-of-week and week-of-year, can also be accessed. For example, the value "2nd October 2007" can be stored in a LocalDate.
BeginnersBook
beginnersbook.com › 2017 › 10 › java-localdate
Java LocalDate
September 11, 2022 - import java.time.LocalDate; public class Example { public static void main(String[] args) { /* This is how we can display the current date using now() * method */ LocalDate currentDate = LocalDate.now(); System.out.println("Current Date is: "+currentDate); /* We can convert a date to local ...
GeeksforGeeks
geeksforgeeks.org › java › java-time-localdate-class-in-java
java.time.LocalDate Class in Java - GeeksforGeeks
July 23, 2025 - Use LocalDateTime.now() and now() method. Use DateTimeFormatter.ofPattern to sort the current date. Display the date which is stored in the variable. Below is the implementation of the problem statement: ... // import package used to work with ...
DigitalOcean
digitalocean.com › community › tutorials › java-8-date-localdate-localdatetime-instant
Java 8 Date: LocalDate, LocalDateTime, Instant Guide | DigitalOcean
August 3, 2022 - Default format of LocalDate=2014-04-28 28::Apr::2014 20140428 Default format of LocalDateTime=2014-04-28T16:25:49.341 28::Apr::2014 16::25::49 20140428 Default format of Instant=2014-04-28T23:25:49.342Z Default format after parsing = 2014-04-27T21:39:48 · Legacy Date/Time classes are used ...
W3Schools
w3schools.com › java › java_date.asp
Java Date and Time
The following example will remove ... class public class Main { public static void main(String[] args) { LocalDateTime myDateObj = LocalDateTime.now(); System.out.println("Before formatting: " + myDateObj); DateTimeFormatter ...