differenceInMinutes

Modified on Tue, 22 Aug 2023

Description

Use this function to get the number of minutes between the given dates.

Syntax

differenceInMinutes(date1, date2)

Returns

Return ValueDescription
NumberReturn the number of minutes between the given dates.

Sample

ExampleResultDescription
differenceInMinutes (2023-4-1-10-30, 2023-4-3-14-45)3015In this example, date1 is April 1st, 2023, at 10:30 am, and date2 is April 3rd, 2023, at 2:45 pm. The function returns 3015, which is the number of minutes between those two dates.

To view all the Date functions, click here.

See Also