Date in JSP

Posted on 2004-09-23
Last Modified: 2008-03-04
I have a form with 6 values, while entering the values, I also need to add today's There is no column to enter date. How should I enter it. Do I need to use hidden field. I would appreciate if I get the code.

Question by:mahender20
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
  • 2

Author Comment

ID: 12135619
There is no text box in the form, but the database has 7 fields, while the form has 6 fields

Accepted Solution

gagaliya earned 75 total points
ID: 12136116
search google for all the java date formats, here are some common ones
dd MMMMM yyyy
yyyy.MM.dd G 'at' hh:mm:ss z
yyyy.MMMMM.dd GGG hh:mm aaa
    String format = "MM/dd/yyyy";
    Date today = new Date();
    SimpleDateFormat formatter = new SimpleDateFormat(format);
    String todaydate= formatter.format(today);
<input type="hidden" name="today_date" value="<%=todaydate%>" ID=Hidden1>

Author Comment

ID: 12136408

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Adults who share images on social media aren’t the only ones who need to worry about their privacy. Our culture’s tendency to share every move and celebration affects the privacy of our children, too.
In order to fulfill our mission of inspiring learning in the technology community, Experts Exchange is launching a Course of the Month program. Premium and Team Account members will have access to one course per month as a part of their membership, …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit If you want to manage em…

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