We need not load the entire Microsoft.VisualBasic.Information.IsDate() for this function alone...
We can use the following the basepage
public static bool IsDate(object Expression)
{
string strDate = Expression.ToString();
try
{
DateTime dt = DateTime.Parse(strDate);
if (dt != DateTime.MinValue && dt != DateTime.MaxValue)
return true;
return false;
}
catch
{
return false;
}
}
Showing posts with label IsDate. Show all posts
Showing posts with label IsDate. Show all posts
Friday, August 31, 2007
Subscribe to:
Posts (Atom)