Table of Contents

Constructor DateDiff

Namespace
YndigoBlue.Velocity.Functions
Assembly
YndigoBlue.Velocity.dll

DateDiff(DatePart, IElement, IElement)

Initializes a new instance of DateDiff.

public DateDiff(DatePart datePart, IElement date1, IElement date2)

Parameters

datePart DatePart

The unit in which to express the difference (Year, Month, Day, Hour, Minute, or Second).

date1 IElement

The earlier date/time (start).

date2 IElement

The later date/time (end). Result is date2 − date1.

DateDiff(DatePart, Column, Column)

Initializes a new instance of DateDiff with both dates as columns.

public DateDiff(DatePart datePart, Column date1, Column date2)

Parameters

datePart DatePart

The unit in which to express the difference.

date1 Column

The start date column.

date2 Column

The end date column. Result is date2 − date1.

DateDiff(DatePart, Column, DateTime)

Initializes a new instance of DateDiff with a column start date and a DateTime end date.

public DateDiff(DatePart datePart, Column date1, DateTime date2)

Parameters

datePart DatePart

The unit in which to express the difference.

date1 Column

The start date column.

date2 DateTime

The DateTime end date literal. Result is date2 − date1.

DateDiff(DatePart, DateTime, Column)

Initializes a new instance of DateDiff with a DateTime start date and a column end date.

public DateDiff(DatePart datePart, DateTime date1, Column date2)

Parameters

datePart DatePart

The unit in which to express the difference.

date1 DateTime

The DateTime start date literal.

date2 Column

The end date column. Result is date2 − date1.

DateDiff(DatePart, Column, DateOnly)

Initializes a new instance of DateDiff with a column start date and a DateOnly end date.

public DateDiff(DatePart datePart, Column date1, DateOnly date2)

Parameters

datePart DatePart

The unit in which to express the difference.

date1 Column

The start date column.

date2 DateOnly

The DateOnly end date literal. Result is date2 − date1.

DateDiff(DatePart, DateOnly, Column)

Initializes a new instance of DateDiff with a DateOnly start date and a column end date.

public DateDiff(DatePart datePart, DateOnly date1, Column date2)

Parameters

datePart DatePart

The unit in which to express the difference.

date1 DateOnly

The DateOnly start date literal.

date2 Column

The end date column. Result is date2 − date1.