Solved

how to print current date in JSP. I am using <%= new java.util.Date() %>, but I want to print date in the format like "October 01, 2008"

Posted on 2008-09-30
2
1,308 Views
Last Modified: 2013-11-24
Hi I want to print date in the JSP page using default java method. I am using <%= new java.util.Date() %>. but the format in which it is printing date includes current date and time with GMT time zone. But I want to print in a format like "October 01, 2008 ".  Can you please help me what code i need to write for this in JSP.
0
Comment
Question by:yashjimmy
2 Comments
 
LVL 23

Accepted Solution

by:
Ajay-Singh earned 500 total points
Comment Utility
You can use this

<%= new java.text.SimpleDateFormat("MMMM dd, yyyy").format(new java.util.Date()) %>
0
 

Author Closing Comment

by:yashjimmy
Comment Utility
thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
fizzArray3  challenge 1 65
mergeTwo  challenge 13 71
mapAB Challlenge 35 84
JAVA part two 5 39
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now