Here many ways to do the same,
1. As you have date value in dateString variable, you can generate required date value and compare,
DateTime dt = DateTime.ParseExact(dateString, "yyyyMMdd", CultureInfo.InvariantCulture);
string requiredDate = dt.ToString("yyyyMMdd");
2. Or try this
DateTime dateValue;
if (DateTime.TryParseExact(dateString, "yyyyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateValue))
{
}
3. you can also use regular expression
Thanks,