Function to obtain the value of the week from the date and time value.
function WeekOf(dt: double): integer;
Parameter |
Type |
Value |
---|---|---|
dt |
double |
date/time value from which you need to obtain a numeric value of the week. |
Returns the week of the year.
var
iWeek: integer;
begin
iWeek := WeekOf(Now);
mLogScript('Current week number is: ' + inttostr(iWeek), '');
end.
[22:05:24] (Log "WeekOf"): Current week number is: 44