How to insert a token (number date) backwards (ie. yy/mm/dd)

Hi folks. Old guy here converting about 90 Quickeys macros over & brand new to KM. Have learned a bit, most are done, one macro I thought would be easy has become a time suck.

Just need a simple macro to paste in the current date formatted like this: 16/25/9 (year, then month, then day). Put another way, need the “number date” token (%NumberDate%) but for KM to paste it in with the year first (iii the yy/mm/dd format). Is there an easy way to flip the number date around, maybe create a “custom” token, etc?

Searched here and GOOG, found similar issues but no solution. Thanks in advance for the help.

Bill

Making progress:
The token “%ICUDateTime%yy/dd/mm%” inserts the year and day correctly but not the month (it gives 16/25/01, not 16/25/9).

Any idea what I need to change “mm” to for it to enter the month correctly??

Thanks again,

Bill

Welcome!

You need capital MM, not mm. If you want single digit month, then just M. I can’t keep it straight, so I keep this page bookmarked:

http://userguide.icu-project.org/formatparse/datetime

1 Like

Yep, got it but appreciate the quick response friend. No idea why this particular syntax works (just played with it until results were correct). Anyone who needs the date in this format just needs to use this token:

%ICUDateTime%yy/dd/MM%

This makes KM paste this text:

16/25/09

This is today’s date (year first, then month, then day), aka YY/MM/DD

Will check out the UG link you provided cfriend. Thanks again,

Bill

Perhaps this Wiki article will help also.

whoops! I forgot abut the wiki. The page I posted has a deeper table on time formats, but does not include anything about timefor, timeplus, timeminus, etc., which are very useful. Thanks.

No worries. I didn’t find that Wiki page the first time I searched for it either. But this time I remembered having seen it, so I was able to find it. :slight_smile:

Usually find things searched & didn’t run across the Wiki either. It explains the syntax/token nomenclature well and will help converting the ten or so macros I have left from Quickeys.

Thanks for the direction cfriend and Dan!

2 Likes

No need to keep it bookmarked, it is in the Keyboard Maestro Help menu.

2 Likes

Also no need to remember how to find the help on the wiki, hold the Option key down when selecting the token from the Edit ➤ Insert Token menu to take you directly to the help on the token.

3 Likes

That is awesome!