Help

Possible DATETIME_DIFF unit bug?

Topic Labels: Dates & Timezones
Solved
Jump to Solution
848 5
cancel
Showing results for 
Search instead for 
Did you mean: 
Elaine_Shi
5 - Automation Enthusiast
5 - Automation Enthusiast

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.

image

Is it possibly a bug?

Thanks,
Elaine

1 Solution

Accepted Solutions
Justin_Barrett
18 - Pluto
18 - Pluto

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.

See Solution in Thread

5 Replies 5
Justin_Barrett
18 - Pluto
18 - Pluto

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.

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.

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

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: