Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date checking

 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have some issues please help me to solve these.I will get the 'from date' and 'to date' from the JSP page. I will get some dates from the datbase also .I have to find the dates that will come under the start date and end date from the JSP.

Please help me....
 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is vague... how do you get the dates form the database ? what do you mean by "under the start date".

do you read the from/to from a form (well, from the form you get Strings, you need DateFormat to parse them to Date objects) ? then you need to find some records in the database that are in the range of these two dates ?

if yes, then restrict your DB query by the dates you get form the form. use a PreparedStatement and the setDate() methods for this.
if no, then perhaps someone else understood and can jump in. otherwise you need to give some more explanation, code, ...

pascal
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64856
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not clear what your question is, but it's certainly not appropriate for this forum.

Moved to Java in General (intermediate).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic