471,881 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,881 software developers and data experts.

date validation

hi everybody,
i have to put date validations in my form.when i am doing it the valid dates are also comming in the same category of invalid dates.

Eg.as 30 th feb is invalid date,the code is showing it right.
but it is also showing 20 feb as invalid date.

so plz help me in providing me the relevant code.

thanks in advance.
Aug 4 '07 #1
1 1006
3,406 Expert 2GB
Date formats always seemed finicky to me, I usually have to test several versions before I get one to work. The first thing I would suggest is figuring out what formats your system recognizes as a valid date. Everything that comes through a form is passed to the script as a string, so if it isn't immediately recognizable it will likely fail. So to test, try a series of dates as strings in different formats, and try to get the script to convert to other date formats or use them in date calculations (such as dateDiff() ).

Aug 6 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

30 posts views Thread by Dr John Stockton | last post: by
reply views Thread by Brian Conway | last post: by
7 posts views Thread by Paul | last post: by
12 posts views Thread by Diego | last post: by
1 post views Thread by Brendan Reynolds | last post: by
3 posts views Thread by =?Utf-8?B?Q2hyaXM=?= | last post: by
2 posts views Thread by John Smith | last post: by
5 posts views Thread by Stang02GT | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.