Dataview dateformat function

That’s really helpful and really far beyond anything I had come close to achieving.

My daily notes are in yearly folders and monthly subfolders. For example:

journal
> 2023
>> 01
>>> 2023-01-01.md
>>> 2023-01-02.md
>>> 2023-01-03.md etc
>> 02
>> 03 etc
> 2022
>> 01
>> 02
>> 03 etc
> 2021
>> 01
>> 02
>> 03 etc

Because of the folder levels, the Extended table view of the date and file stuff returns files only from the month being queried. For today’s daily note it lists all the daily notes for February 2023.

For the Changed list, it lists today’s daily note in isolation. If WHERE file.folder = this.file.folder is removed from the query, it lists the daily notes for this day in previous years AND it gives the formatting I wanted:

Sunday, 26 February 2023
Saturday, 26 February 2022
Friday, 26 February 2021
Wednesday, 26 February 2020
Tuesday, 26 February 2019
Monday, 26 February 2018
Thursday, 26 February 2015
Wednesday, 26 February 2014

So both of the following work perfectly for my needs:

```dataview
TABLE WITHOUT ID 
link(file.link, dateformat(file.day, "cccc, dd MMMM yyyy")) AS "Previous Years"
WHERE file.day.day = this.file.day.day
  AND file.day.month = this.file.day.month 
SORT file.name desc
```

```dataview
LIST WITHOUT ID 
link(file.link, dateformat(file.day, "cccc, dd MMMM yyyy"))
WHERE file.day.day = this.file.day.day
  AND file.day.month = this.file.day.month 
SORT file.name desc
```

It would have taken me a lifetime and more to write this poetic gem: link(file.link, dateformat(file.day, "cccc, dd MMMM yyyy")), so I am really grateful for your help and kindness.

A huge thank you. :clap:t3::raised_hands::pray:

2 Likes