use TryParseExact:
DateTime dt;
bool valid = DateTime.TryParseExact("20140428132222", "yyyyMMddHHmmss", CultureInfo.InvariantCulture, DateTimeStyles.None, out dt);
gives 4/28/2014 1:22:22 PM
solved c# convert string YYYYMMDDTTTTTT to datetime [duplicate]