I am trying to convert TimeStamp to Date format for easier comparisons to fetch records from my MySqlX db but when I try to query it like this
DbDoc docData = new DbDoc(new { _startDate = startDate.Value.ToString("yyyy-MM-dd"), _endDate = endDate.Value.ToString("yyyy-MM-dd") });
collection.Find("DATE_FORMAT(TimeStamp, '%Y-%m-%d') >= :_startDate AND DATE_FORMAT(TimeStamp, '%Y-%m-%d') <= :_endDate").Bind(docData).Execute()
I get an error which says "Sequence contained null element\r\nParameter name: values
How do i solve this Unable to understand where I am going wrong
I am expecting the query to fetch all records on the db comparing only dates and leaving out the time part
c#or aMySQLerror?