Hi,
Best way of validating date is to use
Parse
,
TryParse
or
TryParseExact
instead validating through string.
you can use something like,
string date = "12/12/2012";
DateTime result = default(DateTime);
DateTime.TryParse(date, out result);
after getting datetime in
result
, you can fetch anything from parsed date.
Thanks
-Amit