Hi there, how to calculate the duration of writing an article, say, using start time and end time?

Things I have tried

What I’m trying to do

What I want is to get a result of duration when I make a table statistic.
for example,
start date: 2021-4-23 16:22
finished date: 2021-4-24 16:23

then, how can I get the duration? from 2021-4-23 16:22 to 2021-4-24 16:23
BTW, not calculate manually.

1 Like

Where do you get the time from? Front matter?

If so (and you’re willing to use dictionary keys without a space), you could use the Dataview plugin like so:

start: 2021-04-24T14:00
end: 2021-04-24T15:30

### Test duration

`= this.end - this.start`
`= (this.end - this.start).minutes`

Will display:

Test duration

1 hours, 30 minutes

Note: Dataview as used above will not show the “total minutes” but just the minutes part of the duration.

To easily create the datetime “stamps”, you could use a Templater template and insert it.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.