Renaming, change date format from custom metadata

set r to "July 4, 2021"

set {mm, dd, yyyy} to words of (short date string of (date r))

log (yyyy & mm & dd)
--> (*20210704*)

Yeah, that AppleScript is awful! :stuck_out_tongue: :wink:

Note: The order of the variables will depend on your localization. Here in the US, it’s commonly MM-DD-YYYY, hence the order of mine.