I am trying to build a template for a daily note and I get the following error:
Templater Error: Invalid reference date format, try specifying one with the argument ‘reference_format’.
Here is the template:
due <%+ tp.date.now("YYYY-MM-DD", tp.file.title, "YYYY-MM-DD") %>
done on <%+ tp.date.now("YYYY-MM-DD",tp.file.title, "YYYY-MM-DD")%>
The file name is in the format YYY-MM-DD
Any idea what I am doing wrong?
I’m not an ordinary user of Templater. Casually I use it for simple things. But I have two observations:
Consulting the documentation, I think the used function
tp.date.now("YYYY-MM-DD", tp.file.title, "YYYY-MM-DD") requires the
offset argument, i.e. something like
tp.date.now("YYYY-MM-DD", 0, tp.file.title, "YYYY-MM-DD") > Syntax | Templater
If you want this queries (tasks plugin) in your daily notes, why you use the dynamic command
<%+ ... %> instead of
<% ... %>?
Thank you, I tried the first one but couldn’t make it work either… At the end I gave up and built it with the Template core plugin.
For the second question, I was experimenting with the dynamic command to see if it made a difference (it didn’t) and forgot to remove it before I posted the query.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.