To place a GTD order, first add the Exp. Date and Exp. Time columns to your TWS page. Right click on the tab/page header and select Layout. Here you will find all columns that are available to add to your TWS page. Click the Order Columns tab and find the Time in Force section. Click Exp. Date and Exp. Time followed by the Add button in the middle. You should now see those columns on the left side under Shown Columns. Once finished, click the Apply and OK buttons at the bottom of the window.
Once you have added the columns, bring up an order line for the instrument you wish to trade. Click the Time in Force drop down menu and select GTD from the list. Click the calendar icon in the Exp. Date field to choose an expiration date, and click the calendar icon in the Exp. Time field to choose an expiration time. You can now proceed to configure the rest of your order and transmit when ready.
Find out more on the Good-Til-Date/Time (GTD) orders page of the IBKR website.