Mapping functionsDate & TimeDurationOn this pageDuration The Duration function calculates the duration between two dates. Parameters Unit—REQUIREDThe time unit for the output. Input from datetime—REQUIREDThe start date and time. to datetime—REQUIREDThe end date and time. Output NumberThe duration between the two dates in milliseconds.