property Chart.NonworkingHours as Long
Retrieves or sets a value that indicates the non-working hours, for each hour in a day a bit.

TypeDescription
Long A Long expression that indicates the non-working hours in a day.
By default, the NonworkingHours property is 0, that indicates all hours in a day are working hours. The non-working hours are shown using the NonworkingHoursPattern and the NonworkingHoursColor which defines the pattern and the color, when the base level of the chart displays hours, if the ShowNonworkingUnits property is True ( by default ).  Use the ShowNonworkingUnits property to show or hide the non-working units as hours or days in your chart.

You can select the non-working hours in the following table ( In Internet Explorer, you have to allow running the script on this page ).

24 Hour 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AM/PM 11PM 10PM 9PM 8PM 7PM 6PM 5PM 4PM 3PM 2PM 1PM 12AM 11AM 10AM 9AM 8AM 7AM 6AM 5AM 4AM 3AM 2AM 1AM 12PM
Value 8388608 4194304 2097152 1048576 524288 262144 131072 65536 32768 16384 8192 4096 2048 1024 512 256 128 64 32 16 8 4 2 1
Bit

Click the Bit row for non-working hours and the value for property is: , (hexa), (octal), (binary)

Every bit from the less significant bit, in the NonworkingHours property specifies whether the hour is a not-working or working hour. For instance, if you want to highlight that only 9AM is a not-working hour, you should set the 10th bit in the property on 1 ( the hours starts from 0 to 23 ), and so the value for the NonworkingHours property is 512 ( which binary representation is 1000000000 ). The hours in the property starts from 0AM for the first less significant bit, 1AM for the second bit, like in the following table. 

For instance, if you need the representation of non-working hours from 6PM to 8AM, you need to set on 1 each representative bit in the NonworkingHours property, or to add corresponding values in the last row in the table for each non-working hours, so in this case the  NonworkingHours property is 16253183 or in binary 111110000000000011111111. For instance, if  the NonworkingHours property is 0 or  NonworkingHoursPattern is exPatternEmpty the not-working hours are not highlighted. Use the NonworkingDays property to specify non-working days. Use the Add("A:B") to add a bar that displays the bar A in the working area, and B in non-working areas.