EntityFunctions.DiffDays Method

Definition

Invokes the canonical DiffDays function. For information about the canonical DiffDays function, see Date and Time Canonical Functions.

Overloads

DiffDays(Nullable<DateTime>, Nullable<DateTime>)

Invokes the canonical DiffDays function. For information about the canonical DiffDays function, see Date and Time Canonical Functions.

DiffDays(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

Invokes the canonical DiffDays function. For information about the canonical DiffDays function, see Date and Time Canonical Functions.

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database.

DiffDays(Nullable<DateTime>, Nullable<DateTime>)

Invokes the canonical DiffDays function. For information about the canonical DiffDays function, see Date and Time Canonical Functions.

public:
 static Nullable<int> DiffDays(Nullable<DateTime> dateValue1, Nullable<DateTime> dateValue2);
[System.Data.Objects.DataClasses.EdmFunction("Edm", "DiffDays")]
public static int? DiffDays (DateTime? dateValue1, DateTime? dateValue2);
[<System.Data.Objects.DataClasses.EdmFunction("Edm", "DiffDays")>]
static member DiffDays : Nullable<DateTime> * Nullable<DateTime> -> Nullable<int>
Public Shared Function DiffDays (dateValue1 As Nullable(Of DateTime), dateValue2 As Nullable(Of DateTime)) As Nullable(Of Integer)

Parameters

dateValue1
Nullable<DateTime>

A valid date.

dateValue2
Nullable<DateTime>

A valid date.

Returns

The number of days between dateValue1 and dateValue2.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database.

Applies to

DiffDays(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

Invokes the canonical DiffDays function. For information about the canonical DiffDays function, see Date and Time Canonical Functions.

public:
 static Nullable<int> DiffDays(Nullable<DateTimeOffset> dateValue1, Nullable<DateTimeOffset> dateValue2);
[System.Data.Objects.DataClasses.EdmFunction("Edm", "DiffDays")]
public static int? DiffDays (DateTimeOffset? dateValue1, DateTimeOffset? dateValue2);
[<System.Data.Objects.DataClasses.EdmFunction("Edm", "DiffDays")>]
static member DiffDays : Nullable<DateTimeOffset> * Nullable<DateTimeOffset> -> Nullable<int>
Public Shared Function DiffDays (dateValue1 As Nullable(Of DateTimeOffset), dateValue2 As Nullable(Of DateTimeOffset)) As Nullable(Of Integer)

Parameters

dateValue1
Nullable<DateTimeOffset>

A valid date time offset.

dateValue2
Nullable<DateTimeOffset>

A valid date time offset.

Returns

The number of days between dateValue1 and dateValue2.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database.

Applies to