Possible DATETIME_DIFF unit bug?

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

Welcome to the community, @Elaine_Shi! :smiley: 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.

1 Like

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.

1 Like

@Justin_Barrett explained it better than me. :stuck_out_tongue_closed_eyes: We both posted at the same time. Lol.

1 Like

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

Thank you! :grinning:

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