I don't know Access, so I don't know what the first script is achieving, but if it is computing a difference in days, that would be
IIF (datediff(DAY, sysdatetime(), STATUTE) > 540, 'Yes', 'No') AS Stat2005
The second could be
datediff(MONTH, sysdatetime(), STATUTE) AS St.
- The parameters to datediff come in reverse order to normal subtraction. That is the earlier date/time come first.
- datediff returns the number of boundaries passed. datediff(YEAR, '20230101', '20241231') and datediff(YEAR, '20231231', '20240101') both return 1. But I think the Access expression behaves the same.