Ari,
You could do something like:
bool result = false;
try
{
DateTime dt = DateTime.Parse(dt):
Result = true;
}
catch{}
return result;
hth,
Ian
-----Original Message-----
From: Arindam [mailto:[EMAIL PROTECTED]
Sent: 02 March 2005 16:30
To: [email protected]
Subject: [AspNetAnyQuestionIsOk] How do i check mm/dd/yyy format ?
How do i check my input in the textbox is in 'mm-dd-yyyy' format.
Actually i want to write a function like :
public bool IsProperDate(string dt)
{
if (dt is in date format)
{
return true;
}
else
{
return false;
}
}
How do i write it ?
Thanks
Thanks & Regards
Arindam
Web Designer & Developer
Yahoo! India Matrimony: Find your life partneronline.
[Non-text portions of this message have been removed]
Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/