EdmFunctions.TruncateTime(DbExpression) 方法

定義

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

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ TruncateTime(System::Data::Common::CommandTrees::DbExpression ^ dateValue);
public static System.Data.Common.CommandTrees.DbFunctionExpression TruncateTime (this System.Data.Common.CommandTrees.DbExpression dateValue);
static member TruncateTime : System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function TruncateTime (dateValue As DbExpression) As DbFunctionExpression

參數

dateValue
DbExpression

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

傳回

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

例外狀況

dateValuenull

dateValue 無效。

適用於