Questions tagged [timespan]

An elapsed measurement of time between two events or during which an event, program or a function continues. Also known as a timedelta or a duration.

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

It is also known as a timedelta or a duration in many programming languages.

  • For most intervals of time, this is calculated by:

    EndTime - StartTime
    

    This works especially well for half-open intervals that are used by time-only ranges, or date+time ranges.

  • However, be careful with date-only ranges. Typically these are expressed using fully-closed intervals, such as Jan 1 to Jan 2 to represent two days. This is calculated by:

    EndDate - StartDate + 1
    

See also the and tags.

1171 questions
-6
votes
1 answer

System.TimeSpan.Parse parsing incorrectly for HH:MM:SS where HH >= 24

When parsing a string of the format HH:MM:SS where HH is greater than 24, this seems to parse the time span incorrectly: [MultiTenant\Exchange\] PS C:\Users\vijara> [System.TimeSpan]::Parse("24:00:00") Days : 24 Hours :…
1 2 3
78
79