Can the date from the file name be written to the metadata

Hello,
I use Hazel to rename my PDF´s and then use a script to move it to the different folders in DEVONthink.
This script is very error-prone.
That's why I'm looking for a way to use Hazel to write the date from the filename (which I wrote from the OCR to the filename using various rules) to the metadata. The best date for this is the creation date.
DEVONthink 3 can use this in order to arrange the files in the different folders within DEVONthink using certain "intelligent rules".
I can't use another date, because I want to use the date on the invoice, letter etc..
Is there such a possibility? Maybe via Automator or AppleScript? Then I would be interested in how you can do that.
Thank you very much for your tips
Many greetings
Markus
I use Hazel to rename my PDF´s and then use a script to move it to the different folders in DEVONthink.
This script is very error-prone.
That's why I'm looking for a way to use Hazel to write the date from the filename (which I wrote from the OCR to the filename using various rules) to the metadata. The best date for this is the creation date.
DEVONthink 3 can use this in order to arrange the files in the different folders within DEVONthink using certain "intelligent rules".
I can't use another date, because I want to use the date on the invoice, letter etc..
Is there such a possibility? Maybe via Automator or AppleScript? Then I would be interested in how you can do that.
Thank you very much for your tips
Many greetings
Markus