Thank you. That suits me well as I would actually rather have days than years, months, and days.
I tweaked the code, for aesthetic reasons only, to use an array rather than a paragraph as an array matches my journal’s design:
`$=dv.array(moment('2021-11-15').diff(moment('2021-10-19'), 'days') + " days")`
For my journal template, I am using the following code to create the day’s date dynamically:
`$=dv.array(moment('<% tp.date.now("YYYY-MM-DD") %>').diff(moment('2021-10-19'), 'days') + " days")`
Here’s a sample of your code working for different dates. Perfection:
**Date** | **Duration**
:------------ | :------------
2021-11-15 | `$=dv.array(moment('2021-11-15').diff(moment('2021-10-19'), 'days') + " days")`
2021-11-16 | `$=dv.array(moment('2021-11-16').diff(moment('2021-10-19'), 'days') + " days")`
2021-11-17 | `$=dv.array(moment('2021-11-17').diff(moment('2021-10-19'), 'days') + " days")`
2021-11-18 | `$=dv.array(moment('2021-11-18').diff(moment('2021-10-19'), 'days') + " days")`
2021-11-19 | `$=dv.array(moment('2021-11-19').diff(moment('2021-10-19'), 'days') + " days")`
2021-11-20 | `$=dv.array(moment('2021-11-20').diff(moment('2021-10-19'), 'days') + " days")`
2021-12-09 | `$=dv.array(moment('2021-12-09').diff(moment('2021-10-19'), 'days') + " days")`
I am grubbing around in the dark with all of this, but I saw your comment on GitHub. Is this what you mean?
https://blacksmithgu.github.io/obsidian-dataview/query/expressions/#durations
Indebted. Wowed. And very grateful.
Angel