Dear,
If, instead of 13-01-2003, the user writes 13/01/2003, the system must show an error message.
If, instead of 13-01-2003, the user writes 13-01-03, the system must show an error message.
If, instead of 13-01-2003, the user writes 2003-01-13, the system must show an error message.
And so on…
The error message could be something like:
“Attention! The inserted date is not in the correct format.”
if we enter in one text bow the date, it should check the date.
how i can resolve this, please help me.
Regards,
avmohan
date checking doubt
Moderator: General Moderators
Split the string on "-"
show an error message if
- the resulting array does not have exactly 3 elements
- the last element does not have exactly 4 digits
- checkdate() returns false
see http://php.net/explode and http://php.net/checkdate
show an error message if
- the resulting array does not have exactly 3 elements
- the last element does not have exactly 4 digits
- checkdate() returns false
see http://php.net/explode and http://php.net/checkdate
-
avmohankumar
- Forum Newbie
- Posts: 14
- Joined: Fri Jun 08, 2007 7:20 am
thank you
Dear,
Thank you very much,
I will proceed the things as you said, thanks a lot.
Regards,
avmohan
Thank you very much,
I will proceed the things as you said, thanks a lot.
Regards,
avmohan