Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 4th, 2006, 05:30 AM
Registered User
 
Join Date: Apr 2006
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Validation Expression for Date Values

Hi,

What will be the validation Expression to validate a textbox where the user entered Date values...
I want the date to be in MM/DD/YYYY format

Thanks in advance

  #2 (permalink)  
Old April 4th, 2006, 09:06 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

this expression will do the trick:

(0[1-9]|1[012])[/](0[1-9]|[12][0-9]|3[01])[/](\d{4})

but, be aware, that this forces 2 digit month and days so you should probably apply a JavaScript mask to the date field on your webform so that the user is aware of this.

"The one language all programmers understand is profanity."
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation of an Expression amlesh Beginning VB 6 1 October 25th, 2007 02:31 PM
Validation expression sreevani ASP.NET 1.0 and 1.1 Basics 1 April 5th, 2007 11:22 AM
validation expression keyvanjan ASP.NET 1.0 and 1.1 Basics 3 October 7th, 2006 11:17 AM
Regular Expression validation ranakdinesh ASP.NET 2.0 Professional 0 March 3rd, 2006 08:54 AM
Validation Expression ashokparchuri General .NET 2 May 6th, 2005 05:57 AM



All times are GMT -4. The time now is 05:21 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.