EdmFunctions.TruncateTime(DbExpression) 方法

定義

建立 DbFunctionExpression,其會利用指定的引數叫用標準的 'TruncateTime' 函式,此作業的結果類型必須是 DateTime 或 DateTimeOffset 。 表達式的結果類型與的結果類型 dateValue相同。

C#
public static System.Data.Common.CommandTrees.DbFunctionExpression TruncateTime (this System.Data.Common.CommandTrees.DbExpression dateValue);

參數

dateValue
DbExpression

運算式,指定應截斷之時間部分的值。

傳回

傳回值 dateValue 且時間設定為零的新 DbFunctionExpression。

例外狀況

dateValuenull

dateValue 無效。

適用於

產品 版本
.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