Templater-variable not defined?

hi! I have a problem with my code.

What I’m trying to do

I want obsidian to ask date as text (format as YYYMMDD) from a prompt and get:

  • the date as YYY-MM-DD
  • the day before as YYYY-MM-DD
  • the day before as YYYMMDD

I want these four values to

  • add to dataview for extracting my done task
  • transclude a part of 2 daily page (name as YYYMMDD)

Things I have tried

<%*let qcFileToday =  await tp.system.prompt("date du jour de la daily YYYYMMDD");-%>
<%*let qcFilebefore = tp.date.now("YYYYMMDD", -1, qcfileToday, "YYYYMMDD")-%>
<%*let qcFileDateToday = tp.date.now("YYYY-MM-DD", 0, qcfileToday, "YYYYMMDD")-%>
<%*let qcFileDatebefore = tp.date.now("YYYY-MM-DD", -1, qcfileToday, "YYYYMMDD")-%>

With this code, i have an error:
Templater Error: Template parsing error, aborting.
qcfileToday is not defined

The reference is wrong: try qcFileToday in line two - four, i.e., with the capital F, as you defined it in the first line.

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