Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comparing Dates in MS Access

 
Suji N
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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]

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic