Validar si una cadena cumple con el formato de fecha especificado C#
public static bool IsDate(string inputDate)
{
bool isDate = true;
try{
DateTime dateValue;
dateValue = DateTime.ParseExact(inputDate,"yyyy-MM-dd",null);
}
catch{
isDate = false;
}
return isDate;
}



Comentarios