Top "Timespan" questions

An elapsed measurement of time between two events or during which an event, program or a function continues.

Showing Difference between two datetime values in hours

I am retrieving two date time values from the database. Once the value is retrieved, I need the difference between …

c# asp.net-mvc-2 datetime timespan
How do I convert a TimeSpan to a formatted string?

I have two DateTime vars, beginTime and endTime. I have gotten the difference of them by doing the following: TimeSpan …

c# timespan
TimeSpan to DateTime conversion

I want to convert a Timespan to Datetime. How can I do this? I found one method on Google: DateTime …

c# datetime timespan
Getting time span between two times in C#?

I have two textboxes. One for a clock in time and one for clock out. The times will be put …

c# datetime timespan
Find if current time falls in a time range

Using .NET 3.5 I want to determine if the current time falls in a time range. So far I have the …

c# datetime timespan
Measuring code execution time

I want to know how much time a procedure/function/order takes to finish, for testing purposes. This is what …

c# .net vb.net datetime timespan
calculating the difference in months between two dates

In C#/.NET TimeSpan has TotalDays, TotalMinutes, etc. but I can't figure out a formula for total months difference. Variable …

c# .net datetime timespan
Check if datetime instance falls in between other two datetime objects

I would like to know a simple algorithm to check if the given instance of datetime lies between another two …

c# asp.net datetime timespan
How do I convert ticks to minutes?

I have a ticks value of 28000000000 which should be 480 minutes but how can I be sure? How do I convert …

c# datetime timespan
How to Convert string "07:35" (HH:MM) to TimeSpan

I would like to know if there is a way to convert a 24 Hour time formatted string to a TimeSpan. …

c# timespan