Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Java in General and the fly likes Date checking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Date checking" Watch "Date checking" New topic

Date checking

Ranch Hand

Joined: Oct 09, 2003
Posts: 517
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....

God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
pascal betz
Ranch Hand

Joined: Jun 19, 2001
Posts: 547
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, ...

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

It's not clear what your question is, but it's certainly not appropriate for this forum.

Moved to Java in General (intermediate).

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Date checking
It's not a secret anymore!