Let's say I have a table with a Date column. In my C# application, I want to be able to query for rows using the LIKE operator on the DateTime column. My problem is, how do I handle the regional settings?
For example, if the current regional settings are set to de-DE, the date format of windows is dd.mm.yyyy. Now the user might enter something like %2009, resulting in the following query:
select * from MyTable where to_char(MyDateColumn, 'dd.MM.yyyy') like '%2009'
But with different regional settings, the input of the user will look different of course, so to_char doesn't work anymore.
How can I work around this? Oh, and I'm looking for a database-independent solution.
Many thanks in advance!