I need to find out how many months and years are between a specific date and the present date. For example, this is the format of the date July 16, 2019 to the present date. I need to calculate how many months and years there are in the difference. The date will change so I would need a dynamic expression to work.
When trying to use DateTime.ParseExact(strDate, “dd.MM.yyyy”, CultureInfo.InvariantCulture) I am getting the following error message, ‘CultureInfo’ is not declared. Would you know the reason why I am getting this?