you can parse the string into a date using
Assign CertainDate = Date.ParseExact(StringDate,“yyyyMMdd”,system.Globalization.DateTimeFormatInfo.InvariantInfo) this will give you a datetime variable.
You can then check against datetime.now and compare if it is within
10 days using (CertainDate - DateTime.Now).TotalDays < 10;