String Date Validator

Mark Wagner has a nice helper function for validating a date.

private static bool IsDate(string sDate)
{
DateTime dt;
bool isDate = true;

<span>try<br /> {<br /> dt = DateTime.Parse(sDate);<br /> }<br /> catch<br /> {<br /> isDate = false;<br /> }</span>

<span>return isDate;<br />}</span>