Use the modify_timebox command to modify a timebox value that defines the hours of a week when a role is enabled or disabled. The command defines an hour of the week and then enables or disables that hour in the timebox value. This command is very useful in the set_role_field ADEdit command when setting the timebox field.

Execute this command multiple times on a timebox value to set more than one hour in the value.

For more information about the timebox value format, read the Timebox value format.


modify_timebox strTimeBox day hour avail


This command takes no options.


This command takes the following arguments:

Argument Type Description



A 42-digit hexadecimal timebox value. A value of zero disables all hours of the week. A value of FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF enables all hours of the week.



Required. The day of the week when the hour occurs. 0=Sunday, 1=Monday, and so on to 6=Saturday.



Required. The hour of the day to enable or disable. Takes a value from 0 to 23. 0 is from midnight to 1 AM, 1 is from 1 AM to 2 AM, and so on to 23, which is from 11 PM to midnight.



Required. Whether to enable or disable the specified hour. 0=disable; all other values=enable.

Return value

This command returns a hexadecimal value that is the timebox value after enabling or disabling the specified hour of the week.


set tb 000000000000000000000000000000000000000000
set tb [modify_timebox $tb 6 23 1]

This example returns the modified timebox value:


Related Tcl library commands

The following commands perform actions related to this command:

  • decode_timebox converts an internal timebox value to a decipherable format.
  • encode_timebox converts a readable timebox value to an internal timebox format.