Getting previous date based on a format .
Date format sample : 210315 , that is YYMMDD. I want to check if date is a previous date
Current solution :>
sample_date.ToString.Trim.Split("-"c)(1).ToString < datetime.now.ToString(“yyMMdd”).ToString
But this will include date that are 2 days ago , I only want previous day date
Input : 210314 - True because today is 15 and previous day is 14
Input: 210313 - False since morethan 2 days already had passed this is not last day or previous day.
Any idea ? thanks.
