Skip to content

Instantly share code, notes, and snippets.

@dannberg
Last active December 3, 2025 20:28
Show Gist options
  • Select an option

  • Save dannberg/48ea2ba3fc0abdf3f219c6ad8bc78eb6 to your computer and use it in GitHub Desktop.

Select an option

Save dannberg/48ea2ba3fc0abdf3f219c6ad8bc78eb6 to your computer and use it in GitHub Desktop.
Dann Berg's Daily Note Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. Read the full tour: https://dannb.org/blog/2022/obsidian-daily-note-template/
---
created: <% tp.file.creation_date() %>
---
tags:: [[+Daily Notes]]
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %>
<< [[Timestamps/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|Yesterday]] | [[Timestamps/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow]] >>
---
### πŸ“… Daily Questions
##### 🌜 Last night, after work, I...
-
##### πŸ™Œ One thing I'm excited about right now is...
-
##### πŸš€ One+ thing I plan to accomplish today is...
- [ ]
##### πŸ‘Ž One thing I'm struggling with today is...
-
---
# πŸ“ Notes
- <% tp.file.cursor() %>
---
### Notes created today
```dataview
List FROM "" WHERE file.cday = date("<%tp.date.now("YYYY-MM-DD")%>") SORT file.ctime asc
```
### Notes last touched today
```dataview
List FROM "" WHERE file.mday = date("<%tp.date.now("YYYY-MM-DD")%>") SORT file.mtime asc
```
@Jimothy-Hummel
Copy link

I am getting the Parsing error shown below circled in RED after copying the RAW code from the Github page and pasting it into my Daily Note template file located in Extra/Journal/Template, Daily Note file. Can anybody in this forum please clarify to me why this error is being generated? It says "Expected one of the following:" but I do not know what it is referring to. I am using the latest Obsidian/Templater on a Windows 10 PC. Any advice welcome.

Parsing Error

### Notes created today
Dataview: Error: 
-- PARSING FAILED --------------------------------------------------

> 1 | List FROM "" WHERE file.cday = date("<%tp.date.now("YYYY-MM-DD")%>") SORT file.ctime asc
    |                                                     ^

Expected one of the following: 

'(', ')', '*' or '/' or '%', '+' or '-', ',', '.', '>=' or '<=' or '!=' or '=' or '>' or '<', '[', 'and' or 'or'

### Notes last touched today
Dataview: Error: 
-- PARSING FAILED --------------------------------------------------

> 1 | List FROM "" WHERE file.mday = date("<%tp.date.now("YYYY-MM-DD")%>") SORT file.mtime asc
    |                                                     ^

Expected one of the following: 

'(', ')', '*' or '/' or '%', '+' or '-', ',', '.', '>=' or '<=' or '!=' or '=' or '>' or '<', '[', 'and' or 'or'

I got this parsing error, too. After going back and forth between the video and the template here, I noticed what I believe to be the issue.

Note the ^ character and where it is placed...the double quotes surrounding YYYY-MM-DD should be single quotes. Change those, and then it will parse correctly.

I did this and made sure that the rest of the settings presented in the video and blog were configured. When clicking on the Calendar button, I get a freshly completed Daily Note with the proper date, the Yesterday/Tomorrow links work (creates the file if not present), and the Notes Created/Touched today is populated.

The only thing to figure out is that under Notes I still see - <% tp.file.cursor() %> Not a big deal really but I need to think through if I really want my cursor placed here after opening the template or getting rid of the code and not worrying about it. At this point, this area will likely be a list of tasks/reminders but I haven't decided that as of now.

@Jimothy-Hummel
Copy link

  • Did you tick "automatic jump to cursor" in Templator's options?

Thanks! This got me, too. I'll have to test this out.

@victorwoo
Copy link

Is there a version based on Obsidian Bases instead of Dataview?

@dannberg
Copy link
Author

dannberg commented Dec 3, 2025

@victorwoo not yet! I haven't had a chance to experiment with Bases yet, but it seems like a great alternative that's now native.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment