As @kcwhat mentioned, there are many ways to skin the cat. If you'd like to add some simple error checking, you could use this approach.
Download: Change Format With Simple Error Checking.kmmacros (3.6 KB)
Macro-Notes
- Macros are always disabled when imported into the Keyboard Maestro Editor.
- The user must ensure the macro is enabled.
- The user must also ensure the macro's parent macro-group is enabled.
System Information
- macOS 13.4.1 (22F770820d)
- Keyboard Maestro v10.2
If you might have other input date formats, check out this thread started by @JMichaelTX (RIP): Convert Date String from One Format to Another [Example]