DbFunctions.TruncateTime DbFunctions.TruncateTime DbFunctions.TruncateTime Method

Definition

Overloads

TruncateTime(Nullable<DateTime>) TruncateTime(Nullable<DateTime>) TruncateTime(Nullable<DateTime>)

When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return the given date with the time portion cleared.

TruncateTime(Nullable<DateTimeOffset>) TruncateTime(Nullable<DateTimeOffset>) TruncateTime(Nullable<DateTimeOffset>)

When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return the given date with the time portion cleared.

TruncateTime(Nullable<DateTime>) TruncateTime(Nullable<DateTime>) TruncateTime(Nullable<DateTime>)

When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return the given date with the time portion cleared.

[System.Data.Entity.DbFunction("Edm", "TruncateTime")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="dateValue")]
public static Nullable<DateTime> TruncateTime (Nullable<DateTime> dateValue);
static member TruncateTime : Nullable<DateTime> -> Nullable<DateTime>
Public Shared Function TruncateTime (dateValue As Nullable(Of DateTime)) As Nullable(Of DateTime)

Parameters

dateValue
Nullable<DateTime>

The date/time value to use.

Returns

The input date with the time portion cleared.

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.

TruncateTime(Nullable<DateTimeOffset>) TruncateTime(Nullable<DateTimeOffset>) TruncateTime(Nullable<DateTimeOffset>)

When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return the given date with the time portion cleared.

[System.Data.Entity.DbFunction("Edm", "TruncateTime")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="dateValue")]
public static Nullable<DateTimeOffset> TruncateTime (Nullable<DateTimeOffset> dateValue);
static member TruncateTime : Nullable<DateTimeOffset> -> Nullable<DateTimeOffset>
Public Shared Function TruncateTime (dateValue As Nullable(Of DateTimeOffset)) As Nullable(Of DateTimeOffset)

Parameters

dateValue
Nullable<DateTimeOffset>

The date/time value to use.

Returns

The input date with the time portion cleared.

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