Smart rule Date not Found

This is not possible without scripting.

Bear in mind there may be more than one possible document date detected.

Here is a teaching edition snippet regarding date detection. The results can be used for stringing the parts together or used independently, e.g., used as Tags, etc.


tell application id "DNtp"
	repeat with thisRecord in (selection as list)
		set possibleDates to all document dates of thisRecord
		
		-- Choose the oldest or newest date
		if (count possibleDates) > 1 then
			set docDate to oldest document date of thisRecord
			-- set docDate to newest document date of thisRecord
		else -- Or accept the only possible date
			set docDate to item 1 of possibleDates
		end if
		
		-- Process date 
		set dateYear to year of docDate
		
		set dateMonth to month of docDate as integer
		if dateMonth < 10 then set dateMonth to ("0" & dateMonth)
		
		set dateDay to day of docDate
		if dateDay < 10 then set dateDay to ("0" & dateDay)
		
		-- Create a new date string
		set dateString to (dateYear & dateMonth & dateDay) as string
		
	end repeat
end tell

This could be added in an Execute Script action in a smart rule, however, you’d need to make sure your smart rule is targeting the appropriate files to process (which you should be doing with any smart rule).