Hi. Searched and tried few combination to use yesterday’s date in a template without success. Tried
%date -1d%
%date -1%
%yesterday%
What’s the syntax for yesterday or tomorrow? Thanks
Hi. Searched and tried few combination to use yesterday’s date in a template without success. Tried
%date -1d%
%date -1%
%yesterday%
What’s the syntax for yesterday or tomorrow? Thanks
There are no placeholders for these items. You’d need to create a smart template and the accompanying internal script to define your own placeholders and their replacement values.
Ok. Will have to manually type in yesterday’s date then as I have no idea how to write and add scripts to templates
I was trying to do something like this – find a document with yesterday’s date – and found a solution, so I thought I’d post it here in case anybody else looks.
It uses the ICU Date command ICUDateMinus. My journal titles are in the format 2026-01-08 Thur, so I need the format yyyy-mm-dd EEE
I use Keyboard Maestro to create a variable with yesterday’s date, so need the Keyboard Maestro form of the ICU command:
%ICUDateTimeMinus%1%Days%yyyy-MM-dd EEE%
I can then activate DEVONthink and paste the variable into the Go > Go to Document… command, which then finds the Journal.
Here’s the full macro:
Obviously, there are other ways and possibly quicker / more elegant ways to do this (with AppleScript, Shell scripts and so on), but I use Keyboard Maestro all the time, so this is comfortable for me.
A small snippet, but perhaps it will be useful for someone.