Days between two dates, if one field blank, use todays date instead - doesn't work?

Days between two dates, if one field blank, use todays date instead - doesn't work?

Hi!

I am trying to do a formula in CRM on a product;

It has to show how many days the product was in stock, before it was sold. If it is not sold yet, then it has to show how many days it has currently been in stock.

This is what I came to so far;
If(${Biler.Salgsdato} == "",Datecomp(Now(),${Biler.Lagerdato})/60/24,Datecomp(${Biler.Salgsdato},${Biler.Lagerdato})/60/24)

But it doesn't work, and gives me a syntax error, that I have to use the right module field names. But I have. I might be missing somthing though :(

Biler.Salgsdato = sold date
Biler.Lagerdato = stock date

Can someone point me in the direction for this fix?