Help with Dataview inline link to create or navigate to today's Daily Note WITH path

What I’m trying to do

Add a dynamic link to my dashboard that will create a daily note or navigate to the already created daily note.

Things I have tried

I currently have this dataview link:
=link("User's Personal notes/Journal/dateformat(date(today))", dateformat(date(today), "DD"))

What I’m trying to do is include the dynamic date in the link path after “Journal/”. Current state the new file is created with title “dateformat(date(today))” where I instead need a nested function for today’s date.

I don’t want to use a tp.rename() function as this would not allow the dashboard link to navigate to the daily note after it is renamed.

How do I nest the dateformat function to create this link/new note functionality?

Thank you!

What is the full path of your daily notes?

It should be doable using something like: link("Journal/" + dateformat( date(today), " ... "), "Today") where you insert an adequate date format possibly including other /'s add you see fit.

1 Like

This did it! Thanks for the syntax help. I went with
=link("My/Path/To/Journal/" + dateformat( date(today), "DD"), "Create or go to Daily Note")

The “DD” luxon format matches my Daily Notes format to make this link dynamic to the daily note. Now the link will either create the daily note or go to the daily note if already created.

Thanks again

1 Like

On a sidenote, I just hope you also set date: yyyy-MM-dd within your properties, so that you’re able to later on query your daily notes using file.day (and allow for various date dependent plugins to pickup on the date). Using DD is nice for readability, but not for usability across various plugins as then only the ISO format is recognised.

Yes, thank you. I use templater for that:
created: <% tp.file.creation_date() %>
Last modified: <% tp.file.last_modified_date() %>

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