TimeSpan
noun
say it: “TYM-span” /ˈtaɪmˌspæn/
A length of time, such as 25 days and 3 hours, rather than a moment on the calendar.
What is a TimeSpan in PowerShell?
A TimeSpan is a length of time, not a date: days, hours, minutes and seconds. Take one date from another and you get one; its Days property is the number of whole days between them.
([datetime]'2026-12-04' - [datetime]'2026-11-09').Days # 25
In a sentence
- “Subtracting the two dates gave a TimeSpan of 25 days.”
- “The TimeSpan's Days property told the apprentice how many days were left until Ada was back.”
Level: Apprentice · More PowerShell terms at this level
Updated