protected bool CheckDate(String date)
{
DateTime Temp;
if (DateTime.TryParse(date, out Temp) == true )
return true;
else
return false;
}
-----------------------------------------
protected bool CheckDate(String fromdate, string enddate)
{
DateTime Temp;
DateTime Temp1;
if (DateTime.TryParse(fromdate, out Temp) == true && DateTime.TryParse(enddate, out Temp1) == true)
return true;
else
return false;
}
No comments:
Post a Comment