Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

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
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.
Question by:yashjimmy
LVL 23

Accepted Solution

Ajay-Singh earned 500 total points
ID: 22611592
You can use this

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

Author Closing Comment

ID: 31501845

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
countHi challenge 25 151
json example 39 162
tomcat startup error 5 102
hibernate example issues from command prompt 10 50
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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.

860 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