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,313 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
ID: 22611592
You can use this

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

Author Closing Comment

by:yashjimmy
ID: 31501845
thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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.

733 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