By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,995 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,995 IT Pros & Developers. It's quick & easy.

Validate date in mm/dd/yy format

P: 34
Hi all

I have date in mm/dd/yy format. to validate that one i am using cut and validating using if statements.

But i want regexp.


Please help me regarding this.
Jun 22 '07 #1
Share this Question
Share on Google+
1 Reply


prn
Expert 100+
P: 254
prn
Hi pnsreee,

What kind of "validation" do you want to do? Are you just trying to ensure that the date format is "valid"? (BTW, why are you using 2-digit years? Were you on another planet 8 years ago?) Or are you trying to determine whether the date actually exists? ("02/29/2100" for example?) Or are you trying to determine that it is in the future or past?

I don't think we can help you much without knowing what conditions the "date" needs to meet in order to be "valid". I also have no idea whether a regex solution is remotely near reasonable without knowing about your validity conditions.

Best Regards,
Paul
Jun 22 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.