🚀 Welcome to MDriven Learn –  Don’t miss the latest Release Notes.
OCLOperators TotalMinutes

.TotalMinutes returns the whole length of a TimeSpan in minutes, as a decimal number. Days and hours are converted to minutes, and the seconds and milliseconds left over become the fractional part.

Syntax

aTimeSpan.TotalMinutes

Returns

Double

Example

(DateTime.Parse('2026-11-23 14:30:00.250') - DateTime.Parse('2026-11-20 08:15:30')).TotalMinutes

Result: 4694.50416666667

Model example

Minutes between an object's creation and its last change, in the context of any class that inherits from SysSuperClass:

(self.ChangeTime - self.CreateTime).TotalMinutes

Notes

  • A negative TimeSpan gives a negative result.
  • To get just the minutes part (0–59), use Minutes.

See also