Hi, I hope maybe someone can help me with this formula if/then.

There are three fields in the database:

Birthday (date)

RIP (date of death)

Age (formula)

If RIP is empty, the person is still alive, in which case the current age should be calculated:

`dateBetween(now(),prop(“Birthday”), “years”)`

If RIP is not empty, the person is already deceased, in which case the age at the time of death should be calculated:

`“dateBetween(prop(“RIP”),prop(“Birthday”), “years”)`

Unfortunately, my self-built formula, which is supposed to combine both formulas, does not work:

`if(emptyprop(“RIP”), dateBetween(now(),prop(“Birthday”), “years”), if(not emptyprop(“RIP”), dateBetween(prop(“RIP”),prop(“Birthday”), “years”)`

What must the formula be called for the condition described above to work?