First, search the help docs and this forum. Maybe your question has been answered! The debugging steps can help, too. Still stuck? Delete this line and proceed.
What I’m trying to do
I want to write a simple query that would link to current week.
Could you share an example of what output you’re expecting? Do you have a “week page” that you’re trying to link to? If so, what is the format of the page’s name?
One way to do this, if you want it as a link to a weekly note could be:
`= dateformat(date(now), "'[['yyyy'-W'WW']]'")`
If you don’t want it as a link, just remove the brackets (and single straight quotes). If you just want the week number change the format accordingly to your needs. See dataview’s dateformat for documentation, and luxon tokens for dateformat token.
What do you mean? That is an inline dataview query, which makes it work.
If not using dataview, there exist some solutions as indicating in other posts related to Templater, or other template engines. And you could most likely get quick at to do something similar, but I kind of like dataview, so that’s my default answer…