Un Rato Libre Para Escribir, y si se puede ayudar.....

miércoles, 2 de enero de 2008

Verifica fechas validas

Function for lenguage C# (CSharp)

Function to verify if is valid date or not

public static bool IsDate(object dt)
{
try
{
System.DateTime.Parse(dt.ToString());
return true;
}
catch
{
return false;
}

Return false o true.
If it is true then it is valid date
If it is false then not it is valid date

By GDiaz.

No hay comentarios: