TdxGanttControlTask.Duration Property
Specifies task duration, in ISO 8601 format.
Declaration
property Duration: TDuration read; write;
Property Value
Type |
---|
TDuration |
Remarks
Task duration is the total work time required to accomplish a task. According to the ISO 8601 standard, one day corresponds to twenty four hours. In the project management, one day corresponds to a work day that continues eight hours, so task duration is measured in hours, minutes, and seconds.
Use this property to express the task duration as follows: PT(N)H(N)M(N)S.
Options include:
Value | Description | Example |
---|---|---|
P | Period and time designation. You should use this construction to denote task duration; otherwise, the control throws an exception. | ‘PT8H22M6S’ – eight hours, twenty-two minutes, and six seconds. |
T | ||
N | An integer value. | |
H | Hours, minutes, and seconds. Note To omit a time unit, specify 0 before it. | |
M | ||
S |
The code example below shows how to assign a duration that corresponds to one work day:
var
ATask: TdxGanttControlTask;
ATaskCollection: TdxGanttControlTasks;
begin
ATaskCollection := dxGanttControl1.DataModel.Tasks;
ATask := ATaskCollection.Append;
ATask.Duration := 'PT8H0M0S';
end;
Note
The control ignores this property value until you specify it.