Dataview Query for Dates from Any Metadata Field

What I’m trying to do

Apologies if I’m missing something obvious or looking for something not possible.

I am setting up Obsidian to include some light personal relationship management aspects, which includes saving important dates, such as birthdays, anniversaries, etc.

I would like to query for these saved dates and have them listed in my daily note. I am able to query for common fields, such as every contact having a “birthday” field or “anniversary” field. However, I am wondering how to generalize this to accommodate many fields without needing a comprehensive list. Like if/how I could handle WHERE birthday OR anniversary OR hired-at-job OR won-unique-award OR x OR y OR etc if i don’t yet know all of the future fields that may be used.

Things I have tried

I’ve tried searching for Dataview, dates, query, pairs, wildcards, and some other terms, but every search seems vague/generic, so I’m reading a lot of threads with specific solutions not related to this.

I thought I could maybe use frontmatter with an Object type with the parent being dates and then the child being the various names:

dates:
  birthday: 0000-00-00
  anniversary: 0000-00-00
  unique-name: 0000-00-00

But I couldn’t figure out how to query for “dates” instead of “dates.birthday” or “dates.anniversary” … maybe there’s a way to use a wildcard (i.e. dates.*) instead of a specific field, but I couldn’t find something to learn from about that.

I didn’t expect this to work, but I also tried to use spacing/formatting to my advantage:

dates:
  type: birthday
  date: 0000-00-00

dates:
  type: anniversary
  date: 0000-00-00

This works for the last item in order, but not for any earlier ones.

I’m not sure if I explained myself properly, but hopefully? Anyway, I’m not sure what else to try so figured I’d ask here. Thanks in advance for any help/guidance.

1 Like