aspose file tools*
The moose likes JDBC and the fly likes Comparing Dates in MS Access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Comparing Dates in MS Access" Watch "Comparing Dates in MS Access" New topic
Author

Comparing Dates in MS Access

Suji N
Ranch Hand

Joined: Sep 04, 2001
Posts: 35
Hai Friends
I am using MS ACCESS 2000 Database
I am using the following sqlString in AWT Frame class to fetch the date from MS ACcess Database
I heard that while comparing with >= or <= we need to include # symbol between the date.<br /> I was tried by using #. But i am not able to get the results.<br /> please see the sql query and give me the solution.<br /> Thanksinadvance<br /> Yours<br /> Rajesh<br /> if(Enddate.getText().trim().equals(""))<br /> {<br /> sqlString = "select * from data_comm_err where log_date >= '" + Startdate.getText() + "'";
}
if(Startdate.getText().trim().equals(""))
{
sqlString = "select * from data_comm_err where log_date <= '" + Enddate.getText() + "'";
}
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

The following works for me:
Non-portable MSAccess specific:

Portable --> recommended

Jamie
[This message has been edited by Jamie Robertson (edited November 12, 2001).]
Suji N
Ranch Hand

Joined: Sep 04, 2001
Posts: 35
Thankyou Mr. Jamie
Your Code is Working Fine
Thankyou Very Much
Originally posted by Jamie Robertson:
[B]The following works for me:
Non-portable MSAccess specific:

Portable --> recommended

Jamie
[This message has been edited by Jamie Robertson (edited November 12, 2001).][/B]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Comparing Dates in MS Access