Is Date valid : Time Span Parse « Date Time « C# / C Sharp
- C# / C Sharp
- Date Time
- Time Span Parse
Is Date valid
using System;
using System.Collections.Generic;
using System.Text;
public class Utils
{
public static bool IsDateValid(string p)
{
try
{
DateTime d = DateTime.Parse(p);
return true;
}
catch
{
return false;
}
}
}
Related examples in the same category