regular expression fo date

Posted by Sibin.rhythm under ASP.NET on 8/27/2009 | Views : 2823 | Status : [Member] | Replies : 5
I need one regular expression which satisfy one and only dd/mm/yyyy format.any other format never accept.anyone can help me????




Responses

Posted by: Vuyiswamb on: 8/27/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Morning Sibin.rhythm

Here is your Answer here

http://www.codeproject.com/KB/custom-controls/datevalidator.aspx


Thank for Posting at dotnetfunda


Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Sibin.rhythm, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lakhangarg on: 8/28/2009 [Member] [Moderator] Silver

Up
0
Down
Hi Sibin-

Use This for dd/mm/yyyy format
(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d

Thanks & Regards
Lakhan Pal Garg
http://lakhangarg.blogspot.com/ 


Sibin.rhythm, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sibin.rhythm on: 8/28/2009 [Member] Starter

Up
0
Down
Thankyou very much


Sibin.rhythm, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 8/28/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Thank you for posting at dotnetfunda


Vuyiswa maseko

Thank you for posting at Dotnetfunda
[Administrator]

Sibin.rhythm, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sibin.rhythm on: 8/28/2009 [Member] Starter

Up
0
Down
Thankyou Lakhangarg.

But there is a little bit of problems with this Regular expression

For example
Valid :12/12/2004 02/09/2007

Not Valid :12/12/04
Not Valid :31/0/2004
Not Valid :1/2/09

CAn u help me??

Sibin.rhythm, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response