I type the date often enough that copying and pasting it every time became a nuisance. My preferred format is the compact, sortable ISO format:
On a MacBook, you can insert that format anywhere with one keyboard shortcut. The setup takes a few minutes in Automator, but after that it is much easier than looking up the date and formatting it by hand.
Create the AppleScript
Open Terminal, then use Nano to create a file named shortDate.workflow:
Paste in this AppleScript:
Press Control-O, then Return, to save the file. Press Control-X to leave Nano.
The script gets the current year, month, and day, adds leading zeroes when needed, and types the result as YYYY-MM-DD.
Add it to Automator
- Open Automator.
- Choose File > New, select Quick Action, and click Choose.
- At the top of the workflow, set Workflow receives current to no input and choose any application.
- Search for Run AppleScript in the Actions library and drag it into the workflow area.
- Replace the sample code with the AppleScript above.
- Click Run to test it. The first run may prompt you to grant permission for Automator to control your Mac.
- Save the Quick Action as Short Date.
You can also open the script file manually, copy its contents, and paste them into Automator’s Run AppleScript action. A plain-text script named with a .workflow extension is not itself a complete Automator workflow package, so pasting the code into a new Quick Action is the reliable method.
Grant the required permission
Because the script uses System Events to type the date, macOS may ask for Accessibility permission. If the prompt does not appear—or the test fails—open:
Apple menu > System Settings > Privacy & Security > Accessibility
Enable Automator. Depending on your version of macOS and the app that launches the Quick Action, you may also be asked to approve an entry under Privacy & Security > Automation.
Run the action again after granting permission.
Assign the keyboard shortcut
Open:
Apple menu > System Settings > Keyboard > Keyboard Shortcuts > Services
Find Short Date, usually under the General section, and assign a shortcut. I use:
On a Mac, the Alt key is labeled Option, so this is the same combination you may see described as Control-Alt-Shift-D. You can choose any combination that does not conflict with another macOS or application shortcut.
Use it
Place the cursor in any text field and press your chosen shortcut. The current date should appear immediately in YYYY-MM-DD format.
If nothing happens, check these three things:
- Short Date is enabled in the Services list.
- The shortcut is not already used by another command.
- Automator, System Events, or the calling application has the required permission under Privacy & Security.
Once it is working, inserting a clean, consistent date becomes a single keystroke instead of a copy-and-paste chore.