C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




To restrict date to mm/dd/yyyy format


Posted Date: 31 Jul 2008    Resource Type: Code Snippets    Category: Regular Expressions

Posted By: Sadhana Singh       Member Level: Gold
Rating:     Points: 3



The following code sample is a regular expression that can be used approriately to control date inputs to a particular format. In thise example, we restrict the user to enter date values in month/date/year format.

Take a regular expression validator Control and in validation expression write the following code


([1-9]|1[012])[- /.]([1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Codes  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Remove Trailing Zeroes From a String in C# using Regular Expressions
Previous Resource: Restricting Date Values with Regular Expression validator
Return to Discussion Resource Index
Post New Resource
Category: Regular Expressions


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use