Hi all. I’m hoping I can get some help with a data view query involving calculating dates from YAML Frontmatter
What I’m trying to do
A bit of background:
I have a note for business contacts, where each note has a YAML front matter tag for date when I last sent an email to said contact.
In my notes, I call that date a “sendout”, in the front matter a contact who I emailed on today’s date would appear as:
sendout: 2023-07-03
The dates do not correspond with the creation of the note, it is manually inputted from my emails.
What id like to do, is show a data view table that shows only contacts who’s send-out date is older than 2 months ago (updating in accordance with the current date).
In other words, show only contacts who I emailed 2 months ago or more.
I understand this would involve some kind of variable in addition to the date, however I am new to the program
Things I have tried
I’ve not tried anything yet (I am new to the program and this kind of math is over my head)
Here is an example of my data view table, that pulls from my folders named “Editorial Contacts” and the subfolder “Sendouts”
Table publication, sendout
From "Editorial Contacts/Sendouts"
SORT default(sendout, "") desc
Thanks! Unfortunately even when I turned on the javascript for data view, I couldn’t figure out how to get your code to work (it only showed as blank when I went into read mode)