Add "time" as a property type

Use case or problem

I would like to ask that “time” (alone) is added to property types, so that it will be possible to measure “duration”. Currently it is possible to use either the “Date” or “Date and Time” properties, why not time also?

Use-case: I want to add my sleep time (08:00 hours or similar) to my daily notes (and duration of other activities I do throughout a day) for the purpose of counting that, like habits. With the Date & Time that’s not possible.

Proposed solution

Add time as a property type option which can then be used either by obsidian or other plugins to track habits.

Current workaround (optional)

I have scoured the internet for the past few days but I am unable to find any good workaround that would not overcomplicate things drastically.

3 Likes

Why not just use a standard text property?

You would then just type “08:00” into this.

That’s certainly one way to do it, but I’m not sure if it’s the right way. My ultimate goal is to add these “times” at the end of the month/year, so that I can see how much I did this or that. When it’s text, I could probably find a way to add these numbers as integers, but I don’t know how to add it as time, so that minutes count up to hours, etc. If you know of a way of doing that, please let me know, I am very curious, thanks!

Oh ok, yeah that’s definitely possible.

I could create a dataview script to display that for you in a note, or a Python script to scrape that data and display this in a console window.

If we did this in Python, we could generate some pretty graph using matplotlib, with durations separated by activity in a pie chart or a bar graph? (or both?)

In dataview, we would be more limited though we could create a table with rows for each activity with their total durations beside them? That’s something you could include in your daily note, though also in those general overview notes.

Send me a PM and we can work something out.

1 Like

Thank you for your suggestion. Adding time as a property type would indeed enhance flexibility for tracking durations and specific times, such as sleep duration or other activities.