In an NHibernate NamedQuery, how do you use a DateTimeOffset as a parameter

383 Views Asked by At

When I run a NamedQuery in NHibernate, if I set a DateTimeOffset using SetParameter("name", date) or SetParameter("name", date, new DateTimeOffsetType()), it loses the time offset information when sending the query ('2011-01-01T14:00:00.00').

Does anyone know where/how I can tell NHibernate to use the full date string?

1

There are 1 best solutions below

0
On

Sorry, there was another problem going on with my query. The date time string output was just in NHProfiler. Using regular query logging showed that it is sending the correct time offset information.