語言

EntityFunctions.DiffSeconds 方法

定義

多載

名稱 Description
DiffSeconds(Nullable<DateTime>, Nullable<DateTime>)

當作為 LINQ 對 Entities 查詢的一部分時,此方法會調用典型的 DiffSeconds EDM 函數來計算兩個日期/時間之間的秒數。

DiffSeconds(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

當作為 LINQ 對 Entities 查詢的一部分時,此方法會調用典型的 DiffSeconds EDM 函數來計算兩個日期/時間之間的秒數。

DiffSeconds(Nullable<TimeSpan>, Nullable<TimeSpan>)

當作為 LINQ 對 Entities 查詢的一部分時,此方法會調用典型的 DiffSeconds EDM 函數來計算兩個時間區間之間的秒數。

DiffSeconds(Nullable<DateTime>, Nullable<DateTime>)

當作為 LINQ 對 Entities 查詢的一部分時,此方法會調用典型的 DiffSeconds EDM 函數來計算兩個日期/時間之間的秒數。

[System.Data.Entity.DbFunction("Edm", "DiffSeconds")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="timeValue2")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="timeValue1")]
public static Nullable<int> DiffSeconds(Nullable<DateTime> timeValue1, Nullable<DateTime> timeValue2);
static member DiffSeconds : Nullable<DateTime> * Nullable<DateTime> -> Nullable<int>
Public Shared Function DiffSeconds (timeValue1 As Nullable(Of DateTime), timeValue2 As Nullable(Of DateTime)) As Nullable(Of Integer)

參數

timeValue1
Nullable<DateTime>

第一次約會/時間。

timeValue2
Nullable<DateTime>

第二次約會/時間。

傳回

第一次和第二次約會/時間之間的秒數。

屬性

備註

你不能直接呼叫這個函式。 此函式只能出現在 LINQ 對 Entities 查詢中。 這個函式會被轉換成資料庫中的對應函式。

適用於

DiffSeconds(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

當作為 LINQ 對 Entities 查詢的一部分時,此方法會調用典型的 DiffSeconds EDM 函數來計算兩個日期/時間之間的秒數。

[System.Data.Entity.DbFunction("Edm", "DiffSeconds")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="timeValue2")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="timeValue1")]
public static Nullable<int> DiffSeconds(Nullable<DateTimeOffset> timeValue1, Nullable<DateTimeOffset> timeValue2);
static member DiffSeconds : Nullable<DateTimeOffset> * Nullable<DateTimeOffset> -> Nullable<int>
Public Shared Function DiffSeconds (timeValue1 As Nullable(Of DateTimeOffset), timeValue2 As Nullable(Of DateTimeOffset)) As Nullable(Of Integer)

參數

timeValue1
Nullable<DateTimeOffset>

第一次約會/時間。

timeValue2
Nullable<DateTimeOffset>

第二次約會/時間。

傳回

第一次和第二次約會/時間之間的秒數。

屬性

備註

你不能直接呼叫這個函式。 此函式只能出現在 LINQ 對 Entities 查詢中。 這個函式會被轉換成資料庫中的對應函式。

適用於

DiffSeconds(Nullable<TimeSpan>, Nullable<TimeSpan>)

當作為 LINQ 對 Entities 查詢的一部分時,此方法會調用典型的 DiffSeconds EDM 函數來計算兩個時間區間之間的秒數。

[System.Data.Entity.DbFunction("Edm", "DiffSeconds")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="timeValue1")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="timeValue2")]
public static Nullable<int> DiffSeconds(Nullable<TimeSpan> timeValue1, Nullable<TimeSpan> timeValue2);
static member DiffSeconds : Nullable<TimeSpan> * Nullable<TimeSpan> -> Nullable<int>
Public Shared Function DiffSeconds (timeValue1 As Nullable(Of TimeSpan), timeValue2 As Nullable(Of TimeSpan)) As Nullable(Of Integer)

參數

timeValue1
Nullable<TimeSpan>

第一次。

timeValue2
Nullable<TimeSpan>

第二次時間跨度。

傳回

第一與第二次時間間隔之間的秒數。

屬性

備註

你不能直接呼叫這個函式。 此函式只能出現在 LINQ 對 Entities 查詢中。 這個函式會被轉換成資料庫中的對應函式。

適用於