c# timespan

returnDate = "03/04/2014";
departureDate = "03/01/2014";

 TimeSpan rentalDays = (Convert.ToDateTime(returnDate) -

Convert.ToDateTime(departureDate));


Response.Write(rentalDays.ToString())

it shows 3.00:00:00 from the response.write. How can I make it shown 3 only
CoolDev2014Asked:
Who is Participating?
 
AndyAinscowFreelance programmer / ConsultantCommented:
Is this what you wanted
Response.Write(rentalDays.Days.ToString())
0
 
CoolDev2014Author Commented:
great. Andy. U are the best.
0
 
CoolDev2014Author Commented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.