-->
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.  [ 4 posts ] 
Author Message
 Post subject: problem with retrieving records usind date
PostPosted: Tue Oct 23, 2007 11:16 am 
Newbie

Joined: Tue Oct 23, 2007 11:06 am
Posts: 4
when passing Date(YYYY-MM-DD) of this format as one of the arguments,
the date in database is of (YYYY-MM-DD HH:mm:ss), a mapping problem occurs such that i am unable to retrive the records.
C- calender instance,

method(...,..,new java.sql.Date(C.getTime().getTime()))

now how do i retrieve.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 23, 2007 11:26 am 
Regular
Regular

Joined: Mon Jan 22, 2007 10:32 am
Posts: 101
Post some more information. Code, mapping, column types in db, etc.

As a wild guess may be your columns are timestamp and the value being passed for comparision is not in proper format.

_________________
Please rate this post if you find it helpful


Top
 Profile  
 
 Post subject: date related
PostPosted: Tue Oct 23, 2007 11:42 am 
Newbie

Joined: Tue Oct 23, 2007 11:06 am
Posts: 4
Calendar c1 = Calendar.getInstance();
c1.set(1998,05,25,00,00,00);

new java.sql.Date(c1.getTime().getTime()) will yield ‘1998-06-25’.

methodName(String, String, new java.sql.Date(c1.getTime().getTime())
||
methodName(String, String, Date). - in implementation class

is there any way that i can use like operator to match the data..a guess?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 24, 2007 1:58 am 
Regular
Regular

Joined: Mon Jan 22, 2007 10:32 am
Posts: 101
I am still not able to get what you are trying to do and what issue you are facing?

If you can post some details, code, exception (if any)m etc., I might be able to help.


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

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.