Objective
I have a column with DATE types in the format DD-Mon-YY (i.e. 25-JUN-16), which is an extended date format. I want to use this column as a criteria for a query for entries within the past 10 days and apply logic to it.
Tools: C#, Oracle, LINQ to Entities.
Code
DateTime startDate = DateTime.Today.AddDays(-10);
DateTime endDate = DateTime.Today;
var dates = (from x in db.MY_TABLE
where x.TIMESTAMP >= startDate &&
x.TIMESTAMP <= endDate
select x);
Problem
When I run this code, nothing populates my list. I have read other threads about this problem, but all solutions I've come across suggest converting the Date to a string first and then to a DateTime. I cannot do this because I need to use the Date to query first and LINQ to Entities does not have a ParseExact method.