Skip to content

Instantly share code, notes, and snippets.

@Dynyx
Created June 4, 2012 13:13
Show Gist options
  • Save Dynyx/2868291 to your computer and use it in GitHub Desktop.
Save Dynyx/2868291 to your computer and use it in GitHub Desktop.
IsDate extension method
public static bool IsDate(this string sdate)
{
DateTime dt;
bool isDate = true;
try {
dt = DateTime.Parse(sdate);
}
catch {
isDate = false;
}
return isDate;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment