Avoid date format for meta data

I’m using meta data to store some peoples birthday.

The problem with that ist, that for some people I have the full date (day, month AND year) while for others I only have the day and month.

For that reason I need a text field to store the birthday so I can add
1970-06-09
OR
xxxx-06-09 (in the cases where I don’t have the year)

But as soon as I enter the first full date all meta fields with that name become a date field and I can’t insert the birthdays without year. :frowning:

Can I tell Obisidian that this field is a text field and not a date field.

I would consider splitting this up into two different fields to allow for the properties type to properly doing its thing. Have one field for the birthyear and another for the actual birthdate. This would also make calculations related to this fields a little easier as you could add in the needed part when you want to, instead of having to separate it out in the queries.

1 Like

Interesting approach. Maybe there are other solutions?

By using quotes around the date, you could also force it not to be a date. If not quotes in themselves are not enough, you could also add some other character (or emoji) forcing it to become a text.

Depending on what you use to query, it’ll still be able to transform back into dates. In dataview you could use substrings and the date function. But it would be cleaner to use two fields.

This does not work. :frowning:
I just tryed this:
BD: no year "xxxx-06-10" (source mode)
And get this displayed:
image

This might be a display bug because it says the same when switching between both view modes.

Splitting the fields like you suggested seems to be a good solution.

If you click the icon to the left of BD and change the type to Text, does it work?

1 Like

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