Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 ASP.NET
 validating date using regular expressions
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

salmonraju
Yak Posting Veteran

India
54 Posts

Posted - 04/19/2007 :  05:42:00  Show Profile  Send salmonraju a Yahoo! Message  Reply with Quote
hi i am using .net 1.1 version
i want to validate date entered in textbox using the regular expression ,i find many on internet but all are giving error message

SwePeso
Patron Saint of Lost Yaks

Sweden
30421 Posts

Posted - 04/19/2007 :  05:53:38  Show Profile  Visit SwePeso's Homepage  Reply with Quote
1) Try built-in ISDATE first.
2) Try LIKE. IF txtDate.Text LIKE "####-##-##" THEN ...


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Kristen
Test

United Kingdom
22859 Posts

Posted - 04/19/2007 :  07:17:56  Show Profile  Reply with Quote
"i want to validate date entered in textbox using the regular expression"

I don't think you can. I can't think of a way to get a RegEx to handle 28-days in Feb for a leap year only, for example.

You'd be better off with a date-validation function written in Javascript (or something Server-side if you like).

We use http://groups.yahoo.com/group/validation by Matthew frank

Kristen
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.78 seconds. Powered By: Snitz Forums 2000