Edit

Share via


EntityFunctions.Truncate Method

Definition

Invokes the canonical Truncate function. For information about the canonical Truncate function, see Math Canonical Functions.

Overloads

Truncate(Nullable<Decimal>, Nullable<Int32>)

Invokes the canonical Truncate function. For information about the canonical Truncate function, see Math Canonical Functions.

Truncate(Nullable<Double>, Nullable<Int32>)

Invokes the canonical Truncate function. For information about the canonical Truncate function, see Math Canonical Functions.

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database.

Truncate(Nullable<Decimal>, Nullable<Int32>)

Invokes the canonical Truncate function. For information about the canonical Truncate function, see Math Canonical Functions.

public:
 static Nullable<System::Decimal> Truncate(Nullable<System::Decimal> value, Nullable<int> digits);
[System.Data.Objects.DataClasses.EdmFunction("Edm", "Truncate")]
public static decimal? Truncate (decimal? value, int? digits);
[<System.Data.Objects.DataClasses.EdmFunction("Edm", "Truncate")>]
static member Truncate : Nullable<decimal> * Nullable<int> -> Nullable<decimal>
Public Shared Function Truncate (value As Nullable(Of Decimal), digits As Nullable(Of Integer)) As Nullable(Of Decimal)

Parameters

value
Nullable<Decimal>

The number to truncate.

digits
Nullable<Int32>

The length or precision to truncate to.

Returns

value truncated to the length or precision specified by digits.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database.

Applies to

Truncate(Nullable<Double>, Nullable<Int32>)

Invokes the canonical Truncate function. For information about the canonical Truncate function, see Math Canonical Functions.

public:
 static Nullable<double> Truncate(Nullable<double> value, Nullable<int> digits);
[System.Data.Objects.DataClasses.EdmFunction("Edm", "Truncate")]
public static double? Truncate (double? value, int? digits);
[<System.Data.Objects.DataClasses.EdmFunction("Edm", "Truncate")>]
static member Truncate : Nullable<double> * Nullable<int> -> Nullable<double>
Public Shared Function Truncate (value As Nullable(Of Double), digits As Nullable(Of Integer)) As Nullable(Of Double)

Parameters

value
Nullable<Double>

The number to truncate.

digits
Nullable<Int32>

The length or precision to truncate to.

Returns

value truncated to the length or precision specified by digits.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database.

Applies to