Mark Wagner has a nice helper function for validating a date.
private static bool IsDate(string sDate)
{
DateTime dt;
bool isDate = true;
try
{
dt = DateTime.Parse(sDate);
}
catch
{
isDate = false;
}
return isDate;
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.