Assuming StartDate
and EndDate
are of type DateTime
:
(EndDate - StartDate).TotalDays
More Related Contents:
- Get current date in personalized format in c#
- How can we obtain date time format in yyyy.MM.dd [duplicate]
- How do I get the correct time in C#
- Days between two dates in asp.net
- Get the correct week number of a given date
- Displaying the build date
- Difference in months between two dates
- Datetime – Get next tuesday
- Change system date programmatically
- Javascript date to C# via Ajax
- Compute the DateTime of an upcoming weekday
- Getting day suffix when using DateTime.ToString()
- A type for Date only in C# – why is there no Date type?
- Convert DateTime to Julian Date in C# (ToOADate Safe?)
- Difference between System.DateTime.Now and System.DateTime.Today
- Date difference in years using C# [duplicate]
- Count number of Mondays in a given date range
- Datetime in C# add days
- Random date in C#
- How can I determine the week number of a certain date?
- Parsing a Auto-Generated .NET Date Object with Javascript/JQuery
- Cannot convert from Hijri Date to Gregorian date (c#)
- How can I calculate/find the week-number of a given date?
- How do I determine if a given date is the Nth weekday of the month?
- Specify Date format in MVC5 (dd/MM/yyyy)
- Adding Days to a Date but Excluding Weekends
- How to easily initialize a list of Tuples?
- How can I get date and time formats based on Culture Info?
- How to cancel await Task.Delay()?
- How to write this EF Mock setup code as a reusable Generic Boilerplate?