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

.Seconds returns the seconds part of a TimeSpan as a whole number from 0 to 59 (-59 to 0 for a negative TimeSpan). Days, hours and minutes are not included; for that use TotalSeconds.

Syntax

aTimeSpan.Seconds

Returns

Integer

Example

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

Result: 30

The TimeSpan is 3.06:14:30.250. .Seconds returns 30; the 250 milliseconds are dropped.

See also