Function to obtain the day of the month from the date/time value.

 

Syntax

function DayOf(dt: double): integer;

 

Parameters and return values

Parameter

Type

Value

dt

double

date from which you need get the numeric value of the day.

 

Function result

Day value from 1 through 31.

 

Example


var
  iDay: integer;
  s: string;
begin
  iDay := DayOf(Now);
  
    if iDay <= 10 then s := 'first' 
      else if iDay <= 20 then s := 'second'
        else s := 'third';
          
  mLogScript('Today is the ' + s + ' decade', '');
end.


Script work result

[22:21:49] (Log "DayOf"): Today is the first decade

 

See also

mLogScript

Now

Created with the Personal Edition of HelpNDoc: Effortlessly Convert Your Markdown Content with HelpNDoc