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 Overflow
🌐
Baeldung
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.
Discussions

java - How can I format a 'LocalDate' variable as a string? - Stack Overflow
Take a look at the DateTimeFormatter class. It even has examples of how to convert to and from Strings. ... SimpleDateFormat will not work if he/she is starting with LocalDate, which is new in Java 8. More on stackoverflow.com
🌐 stackoverflow.com
How to persist LocalDateTime values when using MongoDB with Spring
Or you know, don't use local datetimes for things like events which really only need Instants, or OffsetDateTimes A local datetime should only be converted to or from, but never persisted. More on reddit.com
🌐 r/java
13
0
July 4, 2019
Don't use LocalDateTime.

More like, make sure you know the difference between Instant, ZonedDateTime and LocalDateTime before using any of those. Instant is just a point in time (example from the article: a log event), ZonedDateTime is also one of those, but is not guaranteed to remain constant in the timeline, it's tied to a timezone, and those can change their rules. LocalDateTime does not represent the same concept, it's a date in the calendar + a time of the day, and those do not resolve to a point in time without information about a timezone or offset.

I know I just repeated basically what the article said, but the uses of LocalDateTime aren't nearly as farfetched as the author makes it seem. Your alarm clock should use a LocalDateTime, in most cases.

Edit: s/used/uses

More on reddit.com
🌐 r/java
23
0
March 18, 2017
New Java 8 time api "Local"* is counterintuitive to me
I'm learning the "new" java 8 date and time apis. "Local"Date and "Local"Time doesn't really make sense to me. They seem to be dates and times without any time zone data attributed to them, but if something was a Local date or time, wouldn't you WANT the locale/timezone in the date/time? I guess what I'm saying is that I don't understand the "local" name in LocalDate ... More on reddit.com
🌐 r/learnjava
14
11
January 30, 2022
🌐
PriorityQueue
nkamphoa.com › home › localdate class in java
LocalDate Class in Java
September 15, 2025 - Explore the power of LocalDate in Java, Java's modern date handling class for simplified date-based operations. Learn its usage and benefits.
🌐
GeeksforGeeks
geeksforgeeks.org › java › localdate-format-method-in-java
LocalDate format() method in Java - GeeksforGeeks
November 28, 2018 - // Program to illustrate the format() ... GfG { public static void main(String[] args) { // Parses the date LocalDate dt = LocalDate.parse("2018-11-01"); System.out.println(dt); // Function call DateTimeFormatter formatter = ...
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › time › LocalDate.html
LocalDate (Java Platform SE 8 )
October 20, 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.
🌐
How to do in Java
howtodoinjava.com › home › java date time › java localdate
Java LocalDate (with Examples) - HowToDoInJava
April 7, 2023 - For example, 6th Feb 2022 is the 37th day of the year. LocalDate date = LocalDate.ofYearDay(2022, 37); //6th Feb 2022 · The LocalDate class has two overloaded parse() methods to convert a string to a LocalDate instance. parse(CharSequence text) ...
Find elsewhere
🌐
Java Code Geeks
examples.javacodegeeks.com › home › java development › core java
Java LocalDate Example - Java Code Geeks
July 23, 2021 - Current date: 2020-06-15 Current date: 2020-06-09 localDate1 == localDate2 : false Current date time: 2020-06-15T00:00 compareTo : false minus 10 days :2020-07-31 ... That was an example of the Java LocalDate class, which is located in ...
🌐
TutorialsPoint
tutorialspoint.com › javatime › javatime_localdate_now.htm
Java LocalDate Now
package com.tutorialspoint; import java.time.LocalDate; public class LocalDateDemo { public static void main(String[] args) { LocalDate date = LocalDate.now(); System.out.println(date); } }
🌐
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.
🌐
Medium
medium.com › @AlexanderObregon › javas-localdate-parse-method-explained-d2c2bb7322cb
Java’s LocalDate.parse() Method Explained | Medium
August 31, 2024 - A common example is when working with timestamps from logs or databases. Although LocalDate does not include time information, you can still parse a date-time string by defining a formatter that matches the entire input format.
🌐
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 ...
🌐
Baeldung
baeldung.com › home › java › java dates › introduction to the java date/time api
Introduction to the Java Date/Time API | Baeldung
October 13, 2023 - And we can get the LocalDate representing a specific day, month and year by using the of method or the parse method. For example, these code snippets represent the LocalDate for February 20, 2015:
🌐
DigitalOcean
digitalocean.com › community › tutorials › java-8-date-localdate-localdatetime-instant
Java 8 Date - LocalDate, LocalDateTime, Instant | 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 ...
🌐
How to do in Java
howtodoinjava.com › home › java date time › how to format localdate in java
How to Format LocalDate in Java - HowToDoInJava
March 3, 2024 - LocalDate today = LocalDate.now(); DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd-MM-yyyy"); String formattedDate = today.format(dateTimeFormatter); //17-02-2022 · Happy Learning !!
🌐
LabEx
labex.io › tutorials › java-how-to-initialize-localdate-in-java-435618
How to initialize LocalDate in Java | LabEx
Learn essential techniques for creating and manipulating LocalDate instances in Java, covering initialization methods, date generation, and practical examples for modern Java date handling.
🌐
iO Flood
ioflood.com › blog › java-localdate
Java LocalDate: From Basics to Advanced Usage
February 29, 2024 - In this example, we’re using the of() method of the LocalDate class to create an instance representing January 1, 2022. The println() method then prints this date to the console, resulting in the output ‘2022-01-01’. Understanding the ...