Formula issue with Now() and date comparison

Formula issue with Now() and date comparison

Hello evrerybody,

My requirements is to calculate automatically the end date of a product's contract.

Formula should be something like :

IF (start date + duration - prior notice) > now 
= start date + duration - prior notice
(else)
= start date + duration + number of year after 'normal end'
-----------

wich in ZOHO is (in my case) :

If(Adddate(${Produits EN PARC.Date de début du contrat},${Produits EN PARC.Durée (mois)}-${Produits EN PARC.Préavis (mois)},'MONTH')>Now(),
Adddate(${Produits EN PARC.Date de début du contrat},${Produits EN PARC.Durée (mois)},'MONTH'),
Adddate(${Produits EN PARC.Date de début du contrat},${Produits EN PARC.Durée (mois)}+12*
Ceil(Datecomp(Now(),Adddate(${Produits EN PARC.Date de début du contrat},${Produits EN PARC.Durée (mois)}-${Produits EN PARC.Préavis (mois)},'MONTH'))/(1440*30.44/12)),'MONTH'))

--------------


but my issue is the "IF" comparison is not working (I tried by replaceing the "false" result by a simple one (1/1/2020) and get this result although it should be the 'true' one)

I tried to test Now() fonction in formula and build the 'Maintenant' formula which is Now()... and get no result (Date type)

I can't undesrstand.

If someone can help .

Many thanks