Hello,
You should not use #iso when setting a date.
I would do it this way:
var d = new Date("{!ler_date}");
var c = new Date("{!actual_time_of_arrival}");
return (d.getTime()-c.getTime())/24/3600/1000;
Romain,
Thank you for your help! It worked.
Small note to all who is just starting with programming Rollbase -
I was trying to subtract day from one related Object from another day from another object
For that I created template field and imported related date in Java Script format (#js)
{!R62551360.ler_submission_date#js}
Only then I was able to get this formula working.