Given your requirements, I’d suggest alternate approaches since this method does not distinguish between updates applied via BigFix vs. external means. You really have 3 different questions/reports described above:
- Servers that have patches applied within the last X months via BigFix (we could also identify servers that have not had patches applied within the last X months via BigFix).
- Servers that have had patches applied within the last X months outside of BigFix
- Patch compliance
Reports for these can be generated by data the endpoints have already reported, and would be available via Session Relevance for instance. They could query action history as well as Fixlet applicability history.
Additionally, BigFix Compliance’s Patch Reporting may be of interest here.
That said, if the question is how to modify the above relevance to add a filter to the ‘InstalledOn’ field, you might try something like the following (which filters to those installed within the last 60 days - the filter is at the end of the relevance query):
((item 0 of it, ((it as date) of ( ((it as integer as string) of preceding text of last "/" of following text of first "/" of it ) &" "& (preceding text of first "/" of it as integer as month as three letters)&" "& (following text of last "/" of it as integer as string)) of item 1 of it), item 2 of it) of (((if (exists property "HotFixID" of it) then (string value of property "HotFixID" of it) else ("")), (if (exists property "InstalledOn" of it) then ((if (exists hexadecimal integer (it)) then (((month of it as integer as string&"/"& day_of_month of it as integer as string&"/"&year of it as string) of ((january 1 of 1601)+((hexadecimal integer (it)/(864000000000))*day))) of it) else (it)) of string value of property "InstalledOn" of it) else ("")), (if (exists property "Description" of it) then (string value of property "Description" of it) else (""))) of select objects "* from Win32_QuickFixEngineering" of WMI)) whose (item 1 of it > (current date - 60 * day))