A customer wanted to know how many days there were between two dates. Below is a simple example that achieves this.

Create a simple function with below source and then invoke that through logic builder using the 'invoke' block.

Function:

(date1, date2) => do
return date1 - date2
end

Then link the dates to it and it will return you the number of days on the number block.