EntityFunctions.DiffHours Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Invokes the canonical DiffHours
function. For information about the canonical DiffHours
function, see Date and Time Canonical Functions.
Overloads
DiffHours(Nullable<DateTime>, Nullable<DateTime>) |
Invokes the canonical |
DiffHours(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>) |
Invokes the canonical |
DiffHours(Nullable<TimeSpan>, Nullable<TimeSpan>) |
Invokes the canonical |
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.
DiffHours(Nullable<DateTime>, Nullable<DateTime>)
Invokes the canonical DiffHours
function. For information about the canonical DiffHours
function, see Date and Time Canonical Functions.
public:
static Nullable<int> DiffHours(Nullable<DateTime> timeValue1, Nullable<DateTime> timeValue2);
[System.Data.Objects.DataClasses.EdmFunction("Edm", "DiffHours")]
public static int? DiffHours (DateTime? timeValue1, DateTime? timeValue2);
[<System.Data.Objects.DataClasses.EdmFunction("Edm", "DiffHours")>]
static member DiffHours : Nullable<DateTime> * Nullable<DateTime> -> Nullable<int>
Public Shared Function DiffHours (timeValue1 As Nullable(Of DateTime), timeValue2 As Nullable(Of DateTime)) As Nullable(Of Integer)
Parameters
Returns
The number of hours between timeValue1
and timeValue2
.
- 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
DiffHours(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)
Invokes the canonical DiffHours
function. For information about the canonical DiffHours
function, see Date and Time Canonical Functions.
public:
static Nullable<int> DiffHours(Nullable<DateTimeOffset> timeValue1, Nullable<DateTimeOffset> timeValue2);
[System.Data.Objects.DataClasses.EdmFunction("Edm", "DiffHours")]
public static int? DiffHours (DateTimeOffset? timeValue1, DateTimeOffset? timeValue2);
[<System.Data.Objects.DataClasses.EdmFunction("Edm", "DiffHours")>]
static member DiffHours : Nullable<DateTimeOffset> * Nullable<DateTimeOffset> -> Nullable<int>
Public Shared Function DiffHours (timeValue1 As Nullable(Of DateTimeOffset), timeValue2 As Nullable(Of DateTimeOffset)) As Nullable(Of Integer)
Parameters
- timeValue1
- Nullable<DateTimeOffset>
A valid date time offset.
- timeValue2
- Nullable<DateTimeOffset>
A valid date time offset.
Returns
The number of hours between timeValue1
and timeValue2
.
- 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
DiffHours(Nullable<TimeSpan>, Nullable<TimeSpan>)
Invokes the canonical DiffHours
function. For information about the canonical DiffHours
function, see Date and Time Canonical Functions.
public:
static Nullable<int> DiffHours(Nullable<TimeSpan> timeValue1, Nullable<TimeSpan> timeValue2);
[System.Data.Objects.DataClasses.EdmFunction("Edm", "DiffHours")]
public static int? DiffHours (TimeSpan? timeValue1, TimeSpan? timeValue2);
[<System.Data.Objects.DataClasses.EdmFunction("Edm", "DiffHours")>]
static member DiffHours : Nullable<TimeSpan> * Nullable<TimeSpan> -> Nullable<int>
Public Shared Function DiffHours (timeValue1 As Nullable(Of TimeSpan), timeValue2 As Nullable(Of TimeSpan)) As Nullable(Of Integer)
Parameters
Returns
The number of hours between timeValue1
and timeValue2
.
- 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.