ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "davy" <davypulin...@telenet.be>
Subject Small problem with date.
Date Wed, 08 Aug 2007 14:01:41 GMT
I have the next problem, I have a query which must filters a certain period out a number. for
example:
this is the number 54789635479E200708081545 this means 
2007 year 08 month 08 day 15 hour 45 minutes.
Now, i have a query (substr(number,13,8) between ? and ? 

This means that the user can give a certain from date and until date (year,month,day) sow
the query will search on this date in these number

I have developed this :

Example.setOrderByClause("substr(number,13,8)");
Example.createCriteria().andnumberBetween(fDate, uDate);

fDate and uDate = are both strings, these are the 2 dates that the user has given to search
for. 
for example 
fDate = 20050101 from 
uDate = 20063112 until

When i use the query, al my numbers are displayd, butt the query have not worked properly.
Is there someone that has a proposal how it must be done. 





Mime
View raw message