What I’m trying to do
I’ve added the following to my daily note:
[[<% tp.date.now(“DD.MMMM.YYYY”, -1) %>|Yesterday]]
[[<% tp.date.now(“DD.MMMM.YYYY”, +1) %>|Tomorrow]]
But when I click on either link, I get the error message “Filename cannot contain any of the following characters…” etc.
And when I control click on either link a copy of today’s daily note opens again on a new tab.
Things I have tried
I’ve tried removing the “<%” because I’ve seen mention on other forums that Templater adds that some other way but that’s not helping.
Your syntax fails in local tests because of the curly quotes. Straight quotes work locally:
[[<% tp.date.now("DD.MMMM.YYYY", -1) %>|Yesterday]]
[[<% tp.date.now("DD.MMMM.YYYY", +1) %>|Tomorrow]]
Thanks for your help! I now don’t get the error. The problem remains though that when I click on either link, it opens today’s daily note again. Any idea why that might be? Thanks again
@eightning , remember that when the OP is not using proper formatting straight quotes turn into curly quotes by the forum software.
This sounds more like they’re inserting the template code directly into the note, instead of through a template insertion.
If that’s the case, the solution is to put the text into a template note, like “my header”, and then use Templater: insert template modal and select the template from there.
Are the daily notes actually in
What is shown in Obsidian > Settings > Daily Notes > Date Format?
Ah, you’re totally right. I was pasting directly in to the daily note, not the template. Thanks so much.
Seems like you were right.