File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Timestamp between of DateA and DateB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Timestamp between of DateA and DateB" Watch "Timestamp between of DateA and DateB" New topic
Author

Timestamp between of DateA and DateB

nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
Hello,

I have a timestampValue which is mapped as:



in my database, the timestamp-value is something like:



Now, I have two Values of type java.util.Date:



Now, I want a hql, which gives the range between myFirstDate and mySecondDate, something like:



But this does not work as myFirstDate and mySecondDate are not comparable with the Timestamp-Object, or?

Any suggestions?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Timestamp between of DateA and DateB
 
Similar Threads
Issues with fetching Year and Month from the Calender
java.util.date into java.sql.timestamp
add 10 days to currentDate in java.util.Date or cast to Calendar?
struts2 date conversion question
values change unexpectedly due to threading issue?