I guess “file.day.monthyear” is an attempt to say month + year (because weekyear
doesn’t give the week + year, but the number of the week of the year, different from week
as week of the month). For that you need to use the dateformat()
function solution. I already give you an example for “year + week-of-the-year” (dateformat(file.day, "yyyy-WW")
) and the link for all possible tokens. I think now it’s your time to search, explore and found.
If I give you a tailor-made solution you don’t learn anything!
Here you can see all variations you can extract directly from a date:
date.year
, date.month
, date.day
, date.hour
, date.minute
, date.second
, date.week
, date.weekyear
.
https://blacksmithgu.github.io/obsidian-dataview/query/expressions/
Of course you can use solutions as:
...
WHERE file.day.year = date(today).year AND file.day.month = date(today).month
But with dateformat()
you can “build” the comparison with the wanted values from the date. For exemple, with dateformat(file.day, "yyyy-WW")
we can extract this type of format: 2022-38
, i.e., year-week-of-the-year (because «yyyy» is the luxon token for the year and «WW» is the token for the week-of-the-year).