I would like to be able to find find the difference between an employee's join date and today. Here is my C# code:
DateTime JoinDate = Convert.ToDateTime(TextBox1.Text );
DateTime TodayData = DateTime.Now;
TimeSpan servicePeriod = TodayData - JoinDate;
Response .Write ( servicePeriod);
It gives an incorrect answer:
1.11:52:52.6477489
The format of TextBox1.Text is MM/dd/yyyy.
I want the output in Years, Months and Days.