Last installed Patch KB ID and installation date

I’m trying to find out last installed patch information and its installation date. But its not showing last installed KB no.

preceding texts of last " " of preceding texts of last " " of (it as string) of (maximum of last write times of keys whose (name of it contains “.KB” or name of it contains “_KB” or name of it starts with “KB”) of keys( “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall”;“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages”;“HKEY_LOCAL_MACHINE \Software\Microsoft\WindowsNT\CurrentVersion\Hotfix”) of (registry; native registry))

Please refer to below screenshot and Relevance query, Might be helpful.

((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

Thanks Manish… Its working, but can we find only the single patch which is latest installed.