How to set date stamp YYMMDD for a new note from a template?

I found the cool feature under Data > New from Template to insert a note that has a preset text in it and I made my own note templates. I went to an existing note template in that template folder and opened it (Contextual menu > Show Package Contents) and also discovered the key to have an automated date stamp created in the title of the new note.

So when the template file is named %longDate%.rtf the resulting note will be for example Saturday, June 16, 2018.

I then tried to replace the term long with short: %shortDate%.rtf would then result in for example 2018-06-16.

Screenshot 2018-06-16 18.30.52.png

So far so good. But what I want to achieve is that the date stamp looks like this: 180616 (in other words a representation of YYMMDD - 2-digits for the year, 2-digits for the month and 2-digits for the day). I would like to have this because I precede all of my notes with that (really short) date stamp to save space in the file name. I’d like to use it for notes related to phone calls or other meeting notes.

What is the code to use to accomplish that?

There is no specific code for that, unless you rolled your own AppleScript to accomplish it.

You could always change the short date in System Preferences > Language & Region > Advanced > Dates, like so…

There are a few more options listed in the DTPO manual. As an example, I have a note template named ```

Daily notes %year%-%month%-%day%.md

. This will create a new note with a name like

Daily notes 2018-10-24


The documentation of these placeholders is sparse, so it is unclear whether single-digit items will be zero-filled ("01" or "1" for January).  It would be nice to have more details in the docs as well as more placeholders!