Hi all,
we currently use nHibernate 1.0.4 on a MS-SQL 2005 database and .Net 2.0. When I do a query against this databse using a date-time value, I get unexpected results.
The first thing is, that I do use named parameters for these queries, so I thought, that there should be no issue. However, we have a strongly internationalized application, which does change the selected locale for the app (e.g. de-DE or even customized ones like en-DE).
It seems, that the date format used by hybernate is incorrect, as it tries to use mm.dd.yyyy instead of dd.mm.yyyy. I could not quite identify the issue, because when I debug nHibernate and look at the produced query, it looks correct (e.g. dd.mm.yyyy), but I still get the wrong result. Only if I use the format yyyy-mm-dd it works correctly in the SQL Query analyzer.
Is there a way to force nHibernate to produce queries which use the international format of yyyy-mm-dd instead of the local setting?
Kind regards, Marco...
|