What is correct format for dates in list in Front Matter

I am trying to store milestones (descriptor with a date) in a list type property in the frontmatter.

My objective is to later on search for and retrieve those milestones with dataviewjs and pass the descriptor and date to a plugin (not active while testing this and no other date related plugins running right now).

I get strange results as detailed below. I could not find anything like this in the forum discussions. I’m not sure what I am doing wrong.

YearOpen in my examples below is a simple date property.
MileStonesList is the list property of concern here.

What is the correct format for putting dates in a list in frontmatter properties?

Obsidian Help (Properties - Obsidian Help) says to use this format.

Date and Date & time type properties are stored in the following format:

---
date: 2020-08-21
time: 2020-08-21T10:30:00
---

The above format seems to be ‘descriptor colon single space date’.

But when I use it, it fails and generates orange text in reading view (A).

YearOpen: 2024-01-01
MileStonesList:

  • RopeTow: 2023-01-01
  • TBar: 2023-02-02
  • Chair: 2023-03-03
  • JBar

If I remove the space (description colon date), it generates external links (B):

YearOpen: 2024-01-01
MileStonesList:

  • RopeTow:2023-01-01
  • TBar:2023-02-02
  • Chair:2023-03-03
  • JBar

If I omit the colon and use a single space, things seem to work (C).

YearOpen: 2024-01-01
MileStonesList:

  • RopeTow 2023-01-01
  • TBar 2023-02-02
  • Chair 2023-03-03
  • JBar

If I format it as descriptor single space colon date, things seem to work (D).

YearOpen: 2024-01-01
MileStonesList:

  • RopeTow :2023-01-01
  • TBar :2023-02-02
  • Chair :2023-03-03
  • JBar

It appears as if you are trying to nest properties. That isn’t currently supported (using the Properties in document interface). Some topics below; the second one being the feature request and possibly some options to use for now.

In the current version you’d be better off using a custom task decoration in the main text (or dedicated sections) like in:

‐ [M] RopeTow (date:: 2023-01-01)
- [M] TBar (date:: 2023-02-02)
- [M] Chair (date:: 2023-03-03)

Using this format you can query all your milestones using a simple task query searching for status = "M", and you can style the tasks however you like. And since we now are setting the date using an inline field, you could also do all kinds of date queries/manipulation.

Until Obsidian gets the long promised database stuff, this I believe would be the better option.

3 Likes

@ariehen Being able to group key:value sets would be really nice. Thanks for the reference to the discussion. Please add my vote for nested properties.

@holroy I had deferred on using tasks because I did not need the functionality of marking things as complete/incomplete. I will revisit tasks with your idea of decoration and the possibility of queries. This might be workable. I also see from a quick look that tasks support nesting. Thanks for the suggestion.

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