I got this code segment off the Web for checking for a valid date. It gives me a compilation error that
"Cannot convert null to 'System.DateTime' because it is a value type." Can you help?
Thanks,
Dave
public static bool IsDate(string anyString)
{
if (anyString == null)
{
anyString = "";
}
if (anyString.Length > 0)
{
DateTime dummyDate = null;
try { dummyDate= DateTime.Parse(anyString);
} catch { return false;
}
return true;
}
else
{
&nbs ...
Go to the complete details ...