EntityFunctions.TruncateTime Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Invokes the canonical TruncateTime
function. For information about the canonical TruncateTime
function, see Date and Time Canonical Functions.
Overloads
TruncateTime(Nullable<DateTime>) |
Invokes the canonical |
TruncateTime(Nullable<DateTimeOffset>) |
Invokes the canonical |
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<DateTime>)
Invokes the canonical TruncateTime
function. For information about the canonical TruncateTime
function, see Date and Time Canonical Functions.
public:
static Nullable<DateTime> TruncateTime(Nullable<DateTime> dateValue);
[System.Data.Objects.DataClasses.EdmFunction("Edm", "TruncateTime")]
public static DateTime? TruncateTime (DateTime? dateValue);
[<System.Data.Objects.DataClasses.EdmFunction("Edm", "TruncateTime")>]
static member TruncateTime : Nullable<DateTime> -> Nullable<DateTime>
Public Shared Function TruncateTime (dateValue As Nullable(Of DateTime)) As Nullable(Of DateTime)
Parameters
Returns
The input date with the time portion cleared.
- 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
TruncateTime(Nullable<DateTimeOffset>)
Invokes the canonical TruncateTime
function. For information about the canonical TruncateTime
function, see Date and Time Canonical Functions.
public:
static Nullable<DateTimeOffset> TruncateTime(Nullable<DateTimeOffset> dateValue);
[System.Data.Objects.DataClasses.EdmFunction("Edm", "TruncateTime")]
public static DateTimeOffset? TruncateTime (DateTimeOffset? dateValue);
[<System.Data.Objects.DataClasses.EdmFunction("Edm", "TruncateTime")>]
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 offset to truncate.
Returns
The input date with the time portion cleared.
- 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.