IF formula with differents dates

Hello

I’m new in the Airtable community, and formula are definitely not my area of expertise,

I’m trying to make a formula that counts the days of difference between requested return date and the real return dates, however if dates are the same i want the cell to stay empty.

like :
Date return : 02/02/2020
real return : 02/13/2020
Delay : 11

i try with this formula without succes :

IF(IS_AFTER({Real return dates}, {Date return}), DATETIME_DIFF(
{Real return dates}},
{Date return},
‘days’
))

Sorry if this sounds dumb or simple, i’m very new to airtable and formula!

Thanks
alex

Hi @alexandre_Roy,

Welcome to Airtable Community ! :smiley:

I think the only problem you had is a formatting problem in your formula. (for example, there is an extra curly bracket after DATETIME_DIFF({Real return dates}}

This one works

IF(IS_AFTER({Real return dates}, {Date return}),DATETIME_DIFF({Real return dates},{Date return}, 'days'))

BR,
Mo