public static IsDate ( string input ) : System.Boolean | ||
input | string | The string to process. |
return | System.Boolean |
public static Boolean IsDate(string input)
{
Boolean retVal = false;
if (!String.IsNullOrEmpty(input))
{
try
{
DateTime dt = Convert.ToDateTime(input);
retVal = true;
}
catch
{
retVal = false;
}
}
return retVal;
}