If you need convert it with SQL you can try use SqlFunctions.DateAdd and just add zero interval.
var DateQuery = db.Order_Reports.Select(o => new demoDate {
DueDate = SqlFunctions.DateAdd("day", 0, o.ReportDueDateTime),
OrderReportID = o.OrderReportID
});
More Related Contents:
- Linq: help me to make this work
- How do I apply OrderBy on an IQueryable using a string column name within a generic extension method?
- Why is .Contains slow? Most efficient way to get multiple entities by primary key?
- Entity Framework/Linq EXpression converting from string to int
- Filter/Search using Multiple Fields – ASP.NET MVC
- Linq to EntityFramework DateTime
- How to convert an expression tree to a partial SQL query?
- Join and Include in Entity Framework
- Max return value if empty query
- Remove item from list based on condition
- How to do an “in” query in entity framework?
- Keep Getting ‘The LINQ expression node type ‘Invoke’ is not supported in LINQ to Entities’ Exception
- Linq Query keeps throwing “Unable to create a constant value of type System.Object….”, Why?
- How to include() nested child entity in linq
- Should the order of LINQ query clauses affect Entity Framework performance?
- Get all checked nodes of a treeview
- How to flatten tree via LINQ?
- Is DateTime.Now the best way to measure a function’s performance? [closed]
- Can I specify my explicit type comparator inline?
- Entity Framework (.NET Full Framework) Ordering Includes [duplicate]
- How to compare only date components from DateTime in EF?
- Entity Framework 6 Code First Custom Functions
- LINQ to Entities does not recognize the method ‘System.Web.Mvc.FileResult’
- Can I split an IEnumerable into two by a boolean criteria without two queries?
- ef4 cause Circular reference in web service
- Linq Syntax – Selecting multiple columns
- How to parse and generate DateTime objects in ISO 8601 format
- DateTime.Parse(“2012-09-30T23:00:00.0000000Z”) always converts to DateTimeKind.Local
- Convert Date from Persian to Gregorian
- The ObjectContext instance has been disposed and can no longer be used for operations that require a connection [duplicate]