Skip to main content
A newer version of this page is available. .

GanttView.CalculateDuration(DateTime, DateTime) Method

Calculates the time range’s working time duration by using its start and end date.

Namespace: DevExpress.Xpf.Gantt

Assembly: DevExpress.Xpf.Gantt.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Gantt, DevExpress.Wpf.Gantt

Declaration

public TimeSpan CalculateDuration(
    DateTime startDate,
    DateTime finishDate
)

Parameters

Name Type Description
startDate DateTime

Start date and time.

finishDate DateTime

End date and time.

Returns

Type Description
TimeSpan

An actual working time duration for a time range that lasts from startDate to finishDate.

Remarks

The CalculateDuration method calculates the task or strip line duration considering the nonworking date and time rules.

See Also