Back to Devexpress

GanttView.CalculateDuration(DateTime, DateTime) Method

wpf-devexpress-dot-xpf-dot-gantt-dot-ganttview-dot-calculateduration-x28-system-dot-datetime-system-dot-datetime-x29.md

latest1.6 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Wpf.Gantt

Declaration

csharp
public TimeSpan CalculateDuration(
    DateTime startDate,
    DateTime finishDate
)
vb
Public Function CalculateDuration(
    startDate As Date,
    finishDate As Date
) As TimeSpan

Parameters

NameTypeDescription
startDateDateTime

Start date and time.

| | finishDate | DateTime |

End date and time.

|

Returns

TypeDescription
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

GanttView Class

GanttView Members

DevExpress.Xpf.Gantt Namespace