3|s Exploration & Knowledge
Beginning of everything, everywhere and anytime.
Friday, August 30, 2013
C# Get Duration of Days Between 2 Dates
Problem
: How to get duration of days between two dates.
Solution
:
// Get Date Between Two Dates
private int GetDaysBetweenDates(DateTime firstDate, DateTime secondDate)
{
return secondDate.Subtract(firstDate).Days;
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment