Reputation: 4425
I´m changing the connection of my system from ADO to ADO.NET, and the same query does no longer works:
SELECT * FROM MY_TABLE WHERE MY_DATE_FIELD = '2011-01-20'
in ADO.NET I raise an ora-01861 error.
There is a way to change the format that ADO.NET uses ?
Thanks.
Upvotes: 0
Views: 407
Reputation: 38179
SELECT * FROM MY_TABLE WHERE MY_DATE_FIELD = TO_DATE('2011-01-20', 'yyyy-MM-DD')
should do it, you might as well use a parameterized query
Upvotes: 3