EntityFunctions.TruncateTime Method
Invokes the canonical TruncateTime EDM function to return the given date with the time portion cleared when used as part of a LINQ to Entities query.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() ![]() | 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>) | 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. |
EntityFunctions.TruncateTime Method (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.
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "dateValue")] [DbFunctionAttribute("Edm", "TruncateTime")] public static Nullable<DateTime> TruncateTime( Nullable<DateTime> dateValue )
Parameters
- dateValue
-
Type:
System.Nullable<DateTime>
The date/time value to use.
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.
EntityFunctions.TruncateTime Method (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.
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "dateValue")] [DbFunctionAttribute("Edm", "TruncateTime")] public static Nullable<DateTimeOffset> TruncateTime( Nullable<DateTimeOffset> dateValue )
Parameters
- dateValue
-
Type:
System.Nullable<DateTimeOffset>
The date/time value to use.
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.