function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dave BerenatoDave Berenato 

Express Difference Between Two Dates as Currency

Is there anything I can do to the difference between two dates to convert it to a number that could be used in a large calculation (multiply by an integer or a currency field) in a field update for a currency field?
DATE(2019,7,1) – DATE(2019,5,1)

This by itself, as well as in the larger formula where this difference is used to calculate a pro-rated price, gives a "Syntax Error" for a Field Update to a Currency Field
Best Answer chosen by Dave Berenato
Sorna JenefaSorna Jenefa
Hi Dave,

User-added image

Please use the subraction operator from Insert operator option.

Thanks
Jenefa
Sweet Potato Tec

 

All Answers

Raj VakatiRaj Vakati
I am not sure how easy to do it in formula  .. but certainly you can able to do in trigger 
Sorna JenefaSorna Jenefa
Hi Dave,

User-added image

Please use the subraction operator from Insert operator option.

Thanks
Jenefa
Sweet Potato Tec

 
This was selected as the best answer
Dave BerenatoDave Berenato
That made all of the difference, thank you, Jenefa!