Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 7th, 2006, 02:42 AM
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Date in Hibernate

Hello Friends,

I'm using Hibernate/Mysql
I'm applying filter on weeks e.g I could see last weeks' records.
But when there are records of the same month it displays them correct but when there is a month difference (I want to see records of 03/11/2006 to 29/10/2006 then filter is not applying correctly)
not filtering.
The filter applied is given below:

myClassName.start_Date>=current_date-7 and myClassName.start_Date<=current_date

Please help
Gaurav


Reply With Quote
  #2 (permalink)  
Old November 7th, 2006, 09:40 PM
Friend of Wrox
Points: 1,536, Level: 15
Points: 1,536, Level: 15 Points: 1,536, Level: 15 Points: 1,536, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2006
Location: , MI, USA.
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default

Bearing in mind that I know very little about Hibernate, I'd have to ask a couple of questions...

1. What was the value of "current_date"?
2. What were the start_date's the filter returned?
3. You do realize that that the number of days from 29/10/2006 to 03/11/2006 (assuming dd/mm/yyyy format here) is only 6 days, right?
4. Does current_date also contain the current time?
5. Does start_date also contain the current time?


--Jeff Moden
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hibernate.LazyInitializationException briosam BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2 1 July 2nd, 2008 05:18 AM
Crosstab with Hibernate samuels Hibernate 0 May 30th, 2008 07:37 AM
Hibernate help boddu.nageswar Hibernate 1 March 22nd, 2008 09:13 AM



All times are GMT -4. The time now is 12:07 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.