Templater Sudden Fail - Invalid reference date format

I created this template for my weekly notes and started bulk creating them for this year. The template worked just fine for weeks 1-12 and then suddenly started giving me the “invalid reference date format” error on week 13 and on.

My weekly notes are formatted to be titled like: 2025-W02

# <% tp.date.weekday("[Week] WW - YYYY", 0, tp.file.title, "YYYY-[W]WW") %>
[[The Library|❖]] **• [[<% tp.date.weekday("YYYY-[W]WW", -7, tp.file.title, "YYYY-[W]WW") %>|«]] • [[<% tp.date.weekday("YYYY-[W]WW", 7, tp.file.title, "YYYY-[W]WW") %>|»]] • [[<%tp.date.weekday("YYYY-MM", 0, tp.file.title, "YYYY-[W]WW")%>|M<%tp.date.weekday("MM", 0, tp.file.title, "YYYY-[W]WW")%>]] • [[<%tp.date.now("YYYY-[Q]Q", 0, tp.file.title, "YYYY-MM-DD")%>|Q<%tp.date.now("Q", 0, tp.file.title, "YYYY-MM-DD")%>]] • [[<%tp.date.now("YYYY", 0, tp.file.title, "YYYY-MM-DD")%>|A<%tp.date.now("YYYY", 0, tp.file.title, "YYYY-MM-DD")%>]]**
## Rituals & Routines
>[!important]- Last Week
>![[<% tp.date.weekday("YYYY-[W]WW", -7, tp.file.title, "YYYY-[W]WW") %>#What I would like to do next]]
- !!!col
	- ###### 🌱 Plant
		- [ ] Review calendar
		- [ ] Set objectives
		- [ ] Schedule tasks
	- ###### ✨ Weekly Rituals
		- [ ] 🏠 Project check-in
		- [ ] ➕ Therapy/Journal
		- [ ] 💠 Budget review
		- [ ] 🍃 Meditation
	- ###### 🪴 Grow
		- [ ] Review diaries
		- [ ] Learning log
		- [ ] Migrate or cancel incompletes

## Recap
```dataview
table without ID
	file.link AS "Date",
	day-no AS "📆",
	weight AS "#️⃣", 
	exercise AS "🏋️",
	mood AS "🫥",
	symptoms AS "📋"
FROM "The Library/The Study/Diary/<% tp.date.now("YYYY",0, tp.file.title, "YYYY-MM-DD")%>"
WHERE file.name = "<% tp.date.weekday("YYYY-MM-DD", 0, tp.file.title, "YYYY-[W]WW") %>"
	OR file.name = "<% tp.date.weekday("YYYY-MM-DD", 1, tp.file.title, "YYYY-[W]WW") %>"
	OR file.name = "<% tp.date.weekday("YYYY-MM-DD", 2, tp.file.title, "YYYY-[W]WW") %>"
	OR file.name = "<% tp.date.weekday("YYYY-MM-DD", 3, tp.file.title, "YYYY-[W]WW") %>"
	OR file.name = "<% tp.date.weekday("YYYY-MM-DD", 4, tp.file.title, "YYYY-[W]WW") %>"
	OR file.name = "<% tp.date.weekday("YYYY-MM-DD", 5, tp.file.title, "YYYY-[W]WW") %>"
	OR file.name = "<% tp.date.weekday("YYYY-MM-DD", 6, tp.file.title, "YYYY-[W]WW") %>"
SORT file.name ASC

<% tp.date.weekday(“dddd, MMMM Do”, 0, tp.file.title, “YYYY-[W]WW”) %>

![[<% tp.date.weekday(“YYYY-MM-DD”, 0, tp.file.title, “YYYY-[W]WW”) %>#Diary]]

<% tp.date.weekday(“dddd, MMMM Do”, 1, tp.file.title, “YYYY-[W]WW”) %>

![[<% tp.date.weekday(“YYYY-MM-DD”, 1, tp.file.title, “YYYY-[W]WW”) %>#Diary]]

<% tp.date.weekday(“dddd, MMMM Do”, 2, tp.file.title, “YYYY-[W]WW”) %>

![[<% tp.date.weekday(“YYYY-MM-DD”, 2, tp.file.title, “YYYY-[W]WW”) %>#Diary]]

<% tp.date.weekday(“dddd, MMMM Do”, 3, tp.file.title, “YYYY-[W]WW”) %>

![[<% tp.date.weekday(“YYYY-MM-DD”, 3, tp.file.title, “YYYY-[W]WW”) %>#Diary]]

<% tp.date.weekday(“dddd, MMMM Do”, 4, tp.file.title, “YYYY-[W]WW”) %>

![[<% tp.date.weekday(“YYYY-MM-DD”, 4, tp.file.title, “YYYY-[W]WW”) %>#Diary]]

<% tp.date.weekday(“dddd, MMMM Do”, 5, tp.file.title, “YYYY-[W]WW”) %>

![[<% tp.date.weekday(“YYYY-MM-DD”, 5, tp.file.title, “YYYY-[W]WW”) %>#Diary]]

<% tp.date.weekday(“dddd, MMMM Do”, 6, tp.file.title, “YYYY-[W]WW”) %>

![[<% tp.date.weekday(“YYYY-MM-DD”, 6, tp.file.title, “YYYY-[W]WW”) %>#Diary]]


Can anyone help me understand what's gone wrong? 

Thank you in advance!

In the Dataview query with the FROM line you’ve changed to tp.file.title,"YYYY-MM-DD". This is most likely the cause of your problem.

Ah, there were a few instances of those and correcting them did fix the issue! Thank you so much for pointing that out!

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