• Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing Date from HTML Form to JSP/Action Handler  RSS feed

 
Ashu Patel
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends.
In my action handler I am expecting the month and year from the dropdown menu of the HTML form( all user can do is select month and year from respective drop down menu on htmlform..they dont have choice for date. I will providing the query based on the whole month)
My question is how will I make a string of that Date function by just using those month and year parameters passed by form..
becuase I need to pass that date string into PrepareStatement to run Query.
Can any one please help me out..
thanks in advance
Ashu
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm moving this to Java in General (beginner) since it's much more about Java dates than it is about JSP.
bear
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ashu, once you have the month and the year, take a look at the java.util.Calendar class for help in converting this to a date value suitable for use in your SQL query.
bear
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!