1

I often write short text documents on my iPhone, and want to insert a date stamp in the format YYYY-MM-DD. Is there a utility or other means by which I can quickly insert a date stamp instead of typing it manually each time?

1

Sadly, the Shortcuts app is one item short of doing this pretty much natively.

It has a text function that pastes in the value of the current date, but there isn’t ISO formatting option.

I tried a Pythonista script that works very well to get the values you need, just am missing some glue to turn it into a shortcut.

import datetime
iso = datetime.date.today().isoformat()
print(iso)

enter image description here

Siri can even trigger this shortcut (or share sheet) for you, once I figure out how to get the two connected.

enter image description here

  • I wonder if I can use the clipboard module to `clipboard.set(iso) to get the value from Python to paste into whatever app / receiver script I run in shortcuts app. – bmike Mar 10 at 21:26
  • 1
    The „Format Date“ Action has an option to use a user-supplied date format, you can use YYYY-MM-DD there. – nohillside Mar 11 at 6:59
  • @nohillside I missed that totally. Time to make new screen shots and perhaps edit this... – bmike Mar 11 at 22:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .