Then to compare this date with current date we can do like this
but not with string datatype variable rather with datetime variable like this DtOutputDate = Datetime.ParseExact(strInputDate,“dd.MM.yyyy”,System.Globalization.CultureInfo.InvariantCulture)
Then you can compare like this to get the value you DtOutputDate - Now
or DtOutputDate > Now
or DtOutputDate < Now
Kindly try this and let know for any clarification or queries
Cheers @mukeshkala
DateTime dt1=DateTime.ParseExact(strInputDate ,"MM-dd-yyyy",null);
DateTime dt2=Date.Today.ToShortDateString
int cmp=dt1.CompareTo(dt2);
if(cmp>0) {
// date1 is greater means date1 is comes after date2
} else if(cmp<0) {
// date2 is greater means date1 is comes after date1
} else {
// date1 is same as date2
}
Fantastic @mukeshkala
Kindly close this topic with right comment marked as solution that could help others as well looking for ideas under your topic
Cheers @mukeshkala