Please start any new threads on our new site at 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
Save Password
Forgot your Password?

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

Yak Posting Veteran

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

Patron Saint of Lost Yaks

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


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 by Matthew frank

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.03 seconds. Powered By: Snitz Forums 2000