Hi All,

I have to do a validation on date in my form. I get a string of the format "dd/mm/yyyy" in my form. now i have to check that this date should be of the past including the present week(for eg. if I add the entry on 04/09/2007 then all the values upto 08/09/2007 should be valid) . Can anyone tell me how should I do this validation?


Re: Date Validation 80 80

there are several classes that can help you do this, for instance the 'Date' class (but I think the one I'm thinking of is for a large part deprecated)

scrolling through the api's from sun 'll propably get you quite far allready, all you need to do is figure out the right logic behind your own program.

Re: Date Validation 80 80

You can find this website helpfull
Select Java section and go to date and Time

Re: Date Validation 80 80

> I have to do a validation on date in my form.
Look into the SimpleDateFormat and GregorianCalendar classes to achieve your task.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.