Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing Dates in Ms Access

Status
Not open for further replies.

sujitopics

Programmer
Oct 9, 2001
69
KR
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.

I was tried by using #. But i am not able to get the results.

please see the sql query and give me the solution.

Thanksinadvance

Yours

Rajesh

if(Enddate.getText().trim().equals(&quot;&quot;))
{
sqlString = &quot;select * from data_comm_err where log_date >= '&quot; + Startdate.getText() + &quot;'&quot;;
}
if(Startdate.getText().trim().equals(&quot;&quot;))
{
sqlString = &quot;select * from data_comm_err where log_date <= '&quot; + Enddate.getText() + &quot;'&quot;;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top