The Duration
function calculates the duration between two dates.
Parameters
Unit—REQUIRED
The time unit for the output.
from datetime—REQUIRED
The start date and time.
to datetime—REQUIRED
The end date and time.
Output
Number
The duration between the two dates in milliseconds.