calworkhours() Function

This returns the actual number of work hours between two given Date and Times (both inclusive), according to the calendar defined for the system.


calworkhours( start datetime, end datetime, [calendar name] )

start_datetime: (Date and Time) The starting Date and Time.

end_datetime: (Date and Time) The ending Date and Time.

calendar_name: (Text) This optional parameter accepts the name of a system calendar; otherwise, the default calendar is used.




Passing a calendar name allows you to calculate working hours using an alternate system calendar, if you have multiple calendars configured.

See also: Process Calendar Settings


You can experiment with this function in the test box below.

Test Input

calworkhours(datetime(2011,12,20,12,0,0),datetime(2011,12,21,12,0,0)) returns 8

Open in Github Built: Thu, Oct 14, 2021 (02:42:55 PM)

On This Page