Templater - Referencing the date of a future daily note (review)

Hello all,

I’m having a bit of trouble getting the Templater, Review, and Daily Note Plugins to play nice with each other for my specific use case. Sometimes I’ll add a block for future review (for example in 1 week). This creates a Daily Note 1 week away with the reviewed block already embedded - so far so good. My problem is that I use Templater to reference the file’s “Date Created” as a header at the top of my Daily Note using the function

<% tp.file.creation_date(“dddd, MMMM Do YYYY”) %>

To create a line that says something like “Wednesday, August 18th 2021”. Problem is, when Review creates a note in 1 week, the file’s created date is Today so in 1 week the header will have the incorrect date. Could anyone think of any way to get the right full-length date header in the future note that gets created? Having that date header is really helpful for me

Things I have tried

I tried looking at alternative accessible file fields available in Templater. Only one I can think of is <% tp.file.title %> which gets the correct date in the future note but in the wrong format (it looks like 2021-08-25), is there any way to convert formats?

What I’m trying to do

I’d like to ultimately have the right full-length day and date written at the top of that Future Daily Note that gets created when I add a new block for review

Any help would be greatly appreciated!

2 Likes

I use {{date:ddd MMM D}} in my Daily Note template, and when I select a future date in the calendar, it creates a new note with the date I selected in the calendar.

Uses native Templates plug-in, not Templater.

{date:gggg-[W]ww}} to link to my weekly note (titled as 2021-W34.

For previous.next day links, you do need Templater:

Prev: [[ <% tp.date.now(“YYYY-MM-DD - ddd MMM D”, -1, tp.file.title, “YYYY-MM-DD - ddd MMM D”) %>]]
Next: [[<% tp.date.now(“YYYY-MM-DD - ddd MMM D”, 1, tp.file.title, “YYYY-MM-DD - ddd MMM D”) %>]]

I also do this, and it works most of the time!

1 Like

Nice, works perfectly! Thanks for this - I had turned off the core Template plugin and didn’t think to use it

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