- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java Program to format Month in MMMM format
Set the month format as MMMM, while including the date-time format in SimpleDateFormat object.
Firstly, set the date object
Date dt = new Date();
Now, set the format for date-time
SimpleDateFormat dateFormat = new SimpleDateFormat("EEEE MMMM dd yyyy kk:mm:ss");
Display the date with the format you want
dateFormat.format(dt)
The following is an example
Example
import java.text.SimpleDateFormat; import java.util.Date; public class Demo { public static void main(String[] argv) throws Exception { Date dt = new Date(); SimpleDateFormat dateFormat; dateFormat = new SimpleDateFormat("EEEE MMMM dd yyyy kk:mm:ss"); System.out.println(dateFormat.format(dt)); } }
Output
Thursday November 22 2018 11:45:14
- Related Articles
- Display Month in MMMM format in Java
- Format Month in M format in Java
- Format Month in MM format in Java
- Display Month in MMM format in Java
- Java Program to Format time in AM-PM format
- Java Program to format time using Custom Format
- Java Program to format LocalDateTime as ISO_WEEK_DATE format
- Java Program to format LocalTimeDate as BASIC_ISO_DATE format
- Java Program to format hour in H (0-23) format in Java
- Java Program to format date in mm-dd-yyyy hh:mm:ss format
- Java Program to format text in JTextPane
- Java Program to format a string
- Month ("M", "m") Format Specifier in C#
- Year Month ("Y") Format Specifier in C#
- Format Minutes in mm format in Java

Advertisements