aspose file tools*
The moose likes JDBC and the fly likes Problem in paging nation with date format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem in paging nation with date format" Watch "Problem in paging nation with date format" New topic
Author

Problem in paging nation with date format

Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 211

Hi all Ranchers,

I am facing a problem in where clause like this:
select invoiceNo from invoice where current_date_time between STR_TO_DATE('14-03-2012','%d-%m-%Y') and STR_TO_DATE('14-03-2012','%d-%m-%Y')

AND
select invoiceNo from invoice where current_date_time between '2012-03-14 00:00:00' and '2012-03-14 23:59:59'


these are working properly but in pagingnation these working for sometimes after some time these creating a problem

here is my code you can check out it:



when i use pagingnation then dateFrom and dateTo spliling once again so problem are;;;;;;

suggest me!

Thanks in advanced!!

Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

Sorry, but i have no idea what your prblem is, what is actually going wrong? what has pagination got to do with anything? what effect is it having?
if you are getting an exception can you copy and paste that in.
Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 211

Hi,

thanks for reply but the problem has been resolved........

Thanks
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19762
    
  20

Would you like to share how, so others can learn from it?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 211

Hi all,



Actually I was using STR_TODATE('"+dateFrom+"','%d-%m-%Y') and STR_TO_DATE('"+dateTo+"','%d-%m-%Y') rather than current_date_time between '"+dateFrom+" 00:00:00' and '"+dateTo+" 23:59:59'

the problem with str_to_date that searching for current date was not running in a proper way but to select last date(last date) its was running successfully....

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in paging nation with date format