The MilliSecondOfTheMinute function returns the number of milliseconds between the milliseconds represented by the specified TDateTime value AValue, and the start of the same minute on the same day.

Declaration: Function MilliSecondOfTheMinute(const AValue : TDateTime) : Cardinal;

An example of its use.

procedure ScriptEvent (var Value : variant);
var
vMilli : cardinal;
begin
vMilli := MilliSecondOfTheMinute(Now);
LogInfo('Number of milliseconds is '+IntToStr(vMilli));
LogInfo('');
end;