Jul 18, 2020 08:07 PM
Hi Support,
I have a Date field, and wants to get day diff of it till now. Yet when I set ‘d’, ‘days’, “d”,”days”, it’s always said error in formula. Without unit parameter, it works fine with second unit.
Is it possibly a bug?
Thanks,
Elaine
Solved! Go to Solution.
Jul 18, 2020 08:21 PM
Welcome to the community, @Elaine_Shi! :grinning_face_with_big_eyes: Just to clarify, this isn’t Airtable support. It’s a community forum, filled with fellow users like yourself. Airtable staff members do post from time to time, but the vast majority of us are users.
From what I can see in your screenshot, your units specifier (“d”) has styled quotes around it. They may not look that different from normal quotes, but Airtable actually cares which is which, and will only work with non-styled quotes. Compare these two:
"days"
vs “days”
The former has non-styled quotes, the latter has styled quotes.
Also, “days” is preferred over just “d”, though I think the latter still works.
Jul 18, 2020 08:21 PM
Welcome to the community, @Elaine_Shi! :grinning_face_with_big_eyes: Just to clarify, this isn’t Airtable support. It’s a community forum, filled with fellow users like yourself. Airtable staff members do post from time to time, but the vast majority of us are users.
From what I can see in your screenshot, your units specifier (“d”) has styled quotes around it. They may not look that different from normal quotes, but Airtable actually cares which is which, and will only work with non-styled quotes. Compare these two:
"days"
vs “days”
The former has non-styled quotes, the latter has styled quotes.
Also, “days” is preferred over just “d”, though I think the latter still works.
Jul 18, 2020 08:22 PM
I think the problem is the quotation marks around the ‘days’. The quotes are supposed to be straight quotes, not curly quotes, because the Airtable formula engine doesn’t understand curly quotes.
Jul 18, 2020 08:23 PM
@Justin_Barrett explained it better than me. :stuck_out_tongue_closed_eyes: We both posted at the same time. Lol.
Jul 18, 2020 10:50 PM
Thank you, Justin and community.
The mistake is quite a shame, :joy: . I tried to observe and avoid such a quote diff, yet not detected it.
Yes. Tried with “days”, now works fine.
Thanks,
Elaine
Jul 18, 2020 10:52 PM
Thank you! :grinning: