Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 17, 2008 09:09 AM by harish448
Participant
1206 Points
448 Posts
Jul 17, 2008 08:46 AM|LINK
can anyone give me the validation expression for date which shud be of this format?
dd/mm/yyyy
All-Star
25882 Points
3993 Posts
MVP
Jul 17, 2008 09:07 AM|LINK
Try the following regular expression
(0[1-9]|[12][0-9]|3[01])[/](0[1-9]|1[012])[/](19|20)\d\d
1172 Points
198 Posts
Jul 17, 2008 09:08 AM|LINK
Hi there,
a RegularExpresion validator should help you and use this expresstion:
ValidationExpression="^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((1[6-9]|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$"
Member
80 Points
134 Posts
Jul 17, 2008 09:09 AM|LINK
http://forums.asp.net/t/1290924.aspx
pavankumarka...
Participant
1206 Points
448 Posts
validation expression for date?
Jul 17, 2008 08:46 AM|LINK
can anyone give me the validation expression for date which shud be of this format?
dd/mm/yyyy
vik20000in
All-Star
25882 Points
3993 Posts
MVP
Re: validation expression for date?
Jul 17, 2008 09:07 AM|LINK
Try the following regular expression
(0[1-9]|[12][0-9]|3[01])[/](0[1-9]|1[012])[/](19|20)\d\d
www.vikramlakhotia.com
Please mark the answer if it helped you
emady
Participant
1172 Points
198 Posts
Re: validation expression for date?
Jul 17, 2008 09:08 AM|LINK
Hi there,
a RegularExpresion validator should help you and use this expresstion:
ValidationExpression="^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((1[6-9]|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$"
Emad Yazdanpanah
From http://www.CSharpCourses.com
harish448
Member
80 Points
134 Posts
Re: validation expression for date?
Jul 17, 2008 09:09 AM|LINK
http://forums.asp.net/t/1290924.aspx