[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Date in JSP

Posted on 2004-09-23
5
Medium Priority
?
1,098 Views
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.

Thanks
0
Comment
Question by:mahender20
  • 2
3 Comments
 

Author Comment

by:mahender20
ID: 12135619
There is no text box in the form, but the database has 7 fields, while the form has 6 fields
0
 
LVL 1

Accepted Solution

by:
gagaliya earned 300 total points
ID: 12136116
<form>
.........
<%
/***********************************
search google for all the java date formats, here are some common ones
   
dd MMMMM yyyy
yyyyMMdd
dd.MM.yy
MM/dd/yy
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>
</form>
0
 

Author Comment

by:mahender20
ID: 12136408
Thanks
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

830 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