EdmFunctions.DiffMilliseconds(DbExpression, DbExpression) 方法

定義

建立會使用指定引數叫用標準 'DiffMilliseconds' 函式的 DbFunctionExpression,其中的引數都必須具有 DateTime、DateTimeOffset 或 Time 結果型別。 運算式的結果類型為 Edm.Int32。

C#
public static System.Data.Common.CommandTrees.DbFunctionExpression DiffMilliseconds (this System.Data.Common.CommandTrees.DbExpression timeValue1, System.Data.Common.CommandTrees.DbExpression timeValue2);

參數

timeValue1
DbExpression

指定第一個時間值引數的運算式。

timeValue2
DbExpression

指定第二個時間值引數的運算式。

傳回

傳回 與 timeValue2之間timeValue1差異之毫秒數的新 DbFunctionExpression。

適用於

產品 版本
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1