That should work for me as well because for Oracle, DateTime.MinValue
and DateTime.MaxValue work.  I don't know abou tthe other databases
such as MySQL or PostGress.

I would think that this would be a common problem and would have been
great if hibernate provided soem utility function instead of having to
write a user type.


Thanks.
Waqar Sadiq

On Mar 2, 10:42 am, Will Shaver <[email protected]> wrote:
> http://www.primedigit.com/2008/12/02/sql-server-datetime-conversion/
>
> Not explicitly an answer to your question, but I solved it for SQL
> server using the extension method here.
>
> On Mon, Mar 2, 2009 at 8:40 AM, [email protected]
>
>
>
> <[email protected]> wrote:
>
> > I have soem classes that have dates as properties.  I need to run a
> > query in which I need to check to see if the date property is within
> > the min and max range.  Oracle and SqlServer seem to have different
> > values for minimum and maximum dates and those are different than the
> > DateTime.MaxVale and DateTime.MinValue.  Does hibernate provide some
> > way of discovering the min and max datetime values for the underlying
> > database?
>
> > Thanks.
>
> > Waqar Sadiq- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to