I have a begin and start DateTime for a conversion that gets logged at the start and end of this event. I then generate a report that lists a bunch of information about the event including its runtime. I have a column for total time elapsed (in days) and a date representation of start and stop. Everything is in days, I don't care about hours/minutes/seconds.
If the start time is 9/29/2010 and the end time is 9/31/2010 I want to print:
9/29-31/2010
If the start time is 9/29/2010 and the end time is 10/2/2010 I want to print:
9/29-10/2/2010
If the start time is 12/29/2010 and the end time is 1/2/2011 I want to print:
12/29/2010-1/2/2011
I know I can use the ToString("M/d/yyyy") method of datetime to print each individual date, but I'm hoping for an easy way to print two dates in a similar format.