Adding links for Tomorrow and Yesterdayn to my daily note results in error

What I’m trying to do

I’ve added the following to my daily note:

[[<%“DD.MMMM.YYYY”, -1) %>|Yesterday]]
[[<%“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:

[[<%"DD.MMMM.YYYY", -1) %>|Yesterday]]  
[[<%"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

@anon63144152 , 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.

1 Like

Are the daily notes actually in DD.MMMM.YYYY format?

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.

1 Like

Seems like you were right. :smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.