EdmFunctions.TruncateTime(DbExpression) Metod

Definition

Skapar en DbFunctionExpression som anropar den kanoniska funktionen "TruncateTime" med det angivna argumentet, som måste ha en DateTime- eller DateTimeOffset-resultattyp. Resultattypen för uttrycket är samma som resultattypen dateValueför .

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

Parametrar

dateValue
DbExpression

Ett uttryck som anger det värde för vilket tidsdelen ska trunkeras.

Returer

En ny DbFunctionExpression som returnerar värdet dateValue för med tiden inställd på noll.

Undantag

dateValue är null.

dateValue är ogiltigt.

Gäller för