you may also want to look at
var hours = (datevalue1 - datevalue2).TotalHours;
More Related Contents:
- Find if current time falls in a time range
- calculating the difference in months between two dates
- Measuring code execution time
- Environment.TickCount vs DateTime.Now
- What is the easiest way to subtract time in C#?
- Check if datetime instance falls in between other two datetime objects
- Getting time span between two times in C#?
- how to increase time by 15 mins using c#
- Calculate relative time in C#
- C# DateTime to “YYYYMMDDHHMMSS” format
- Creating a DateTime in a specific Time Zone in c#
- How to write a simple Html.DropDownListFor()?
- Convert string to DateTime in c#
- How can I get the DateTime for the start of the week?
- How do I format a DateTime in a different format?
- Format TimeSpan greater than 24 hour
- How to compare DateTime in C#?
- How do I loop through a date range?
- How to Validate a DateTime in C#?
- Parse datetime in multiple formats
- How do I get the time difference between two DateTime objects using C#?
- DateTime format to SQL format using C#
- How to find the 3rd Friday in a month with C#?
- How does DateTime.ToUniversalTime() work?
- Converting string format to datetime in mm/dd/yyyy
- How to parse string with hours greater than 24 to TimeSpan?
- Where’s the DateTime ‘Z’ format specifier?
- C# date formatting is losing slash separators
- Set Default DateTime Format c#
- Specify Date format in MVC5 (dd/MM/yyyy)