You have to convert the string representing a date to a numeric date representation (
DateTime Structure (System)[
^] with C#). Then use that to perform the calculation (see the
DateTime.Add[xxx]
functions). To print the date out use
DateTime.ToString
. Because you want to pass it to Excel, it would be better to use the numeric value and pass that to Excel (which might require setting the cell format depending on the used export method).
The problem is that there are many different date formats. But if you know the exact format the conversion is no problem (use
DateTime.[Try]ParseExact
). Otherwise use
DateTime.TryParse
to check if the string was recognised as date.