Hello.
I want to filter values from database based on date.
Date in a database contains values like this: 2008-12-28 18:00:00. And my class has a DateTime variable depending on which I want to filter. Ideally it would work like this:
myBindingSource.Filter = "DATE(myDateField) = myDateTime.Date"
+ adjusting myDateTime.Date format as needed.
But it throws an EvaluateException: "The expression contains undefined function call DATE()."
Although if I execute the SQL statement directly, I can use the DATE() function in filter.
P.S. I use MYSQL DB with the Connector/Net 5.2
How can I solve this problem?
Thank You all for suggestions.