I have two dates, one less than the other. I want to create a string such as this one
\"0 days, 0 hours, 23 minutes, 18 seconds\"
representing the differenc
DateTime myDay = DateTime.Now; DateTime otherDate = DateTime.Now.AddYears(1); var test = otherDate.Subtract(myDay); Console.WriteLine("Days:" + test.Days + "Hours:" + test.Hours +"Minutes" + test.Minutes +"Seconds" + test.Seconds);
Here test is of type TimeStamp