differenceInHours
Modified on Tue, 22 Aug 2023
Description
Use this function to get the number of hours between the given dates.
Syntax
differenceInHours(dateLeft, dateRight, options)
Returns
Return Value | Description |
---|---|
Number | Number of hours between the given dates. |
Sample
Example | Result | Description |
---|---|---|
differenceInHours(2023-4-1-10-0-0, 2023-4-3-14-30-0) | 52.5 | This example calculates the number of hours between April 1st, 2023 at 10:00am and April 3rd, 2023 at 2:30pm, giving a result of 52.5 hours. |
To view all the Date functions, click here.
See Also
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article