MinuteOfTheMonth returns the number of complete minutes between the TDateTime value entered as AValue, and 12:00 A.M. of the first day of the month that is specified by AValue.

Declaration: Function MinuteOfTheMonth(const AValue: TDateTime): Word;

A simple example follows.

procedure ScriptEvent (var Value : variant);
var
TheMin : word;
begin
//If YESTERDAY is 29-11-2023, the result is 40320
TheMin := MinuteOfTheMonth(Yesterday);
LogInfo('The number of minutes since 1st Nov 23 is '+IntToStr(TheMin));
end;