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

.Milliseconds returns the milliseconds part of a TimeSpan as a whole number from 0 to 999 (-999 to 0 for a negative TimeSpan). Larger units are not included; for that use TotalMilliseconds.

Syntax

aTimeSpan.Milliseconds

Returns

Integer

Example

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

Result: 250

See also