1
Answer

How to Calculate past date based on today's date and given number of months

jatt scorpion

jatt scorpion

14y
7.2k
1
Hi,
I am trying to write c# code to calculate starting date from total number of months spent at each place. I have number of months and I want to calculate starting date based on today's date and number of months spent.

Any suggestions please, I will appreciate it if anyone can send me a sample code. 

Thanks in advance.

Regards
JS
Answers (1)
0
Sam Hobbs

Sam Hobbs

NA 28.7k 1.3m 14y
Use the TimeSpan Structure; look at the documentation of it, it is easy to use.