• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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

 
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
 
Author and ninkuma
Marshal
Posts: 66787
168
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: 66787
168
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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!