These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Query: "Select from ... where date > given_date"
PostPosted: Sat Jan 03, 2009 1:17 pm 
Newbie

Joined: Wed Sep 17, 2008 5:26 pm
Posts: 17
I got an object that contains a java.util.Date variable. This object is mapped via Hibernate to a mySQL database. The corresponding type of the variable is "datetime" in my mySQL database.

Now i got the following dates in the object's table
Date
1. Dec 2008
3. Nov 2008
25. Oct 2008
etc

Intuitivly spoken what i want to do is a query like this
from Objectname where Date > "1. Nov. 2008"

In return i want to get the following list as a result:
1. Dec. 2008
3. Nov. 2008

25. Oct. 2008 is not contained in this list since it is older that 1.Nov.2008

Can somebody tell me how i can accomplish this?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.