I use Obsidian to keep my daily journal. I created a Shortcuts automation that sends my workout data from my iPhone and creates a page in Obsidian. Then, Dataview makes a table from that data on my daily page. I have the duration set as a simple decimal (“22.4 mins”), but it gets displayed in the table as “22 minutes, 23 seconds, 1000 ms”.
Is there some sort of syntax I can use to force Dataview to display the duration more compactly? I checked this forum and the Dataview GitHub, but can’t find anything.
If allowed, I just add an extra option using the original “22.4 mins” format:
---
duration: 22.4 mins
---
```dataview
TABLE name AS "Name", duration.minutes AS "⏱", ...
```
If your values in duration are only in minutes, then you can use the duration.minutes to get only minutes. If you use duration.hours you get the conversion of the input value (in minutes) to hours: 22.4 mins → 0.3733
Tacking into this, is it possible in the way that dateformat() allows for options to get this to show as hrs instead of hours, m or even mins instead of minutes?
Usecase: Ideally I want to display my sleep diary in the format: 8hrs 20mins