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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple SQL Statement

Status
Not open for further replies.

mans

Programmer
Mar 18, 2000
136
AU
Hello,<br><br>I am looking to execute an SQL query in VB6 which is directed to Access2000.&nbsp;&nbsp;I am looking to extract data for a certain date.&nbsp;&nbsp;The date is in the format “dd/mm/yy” in the table that is being queried, when I try to query the data in that table, Access2000 reads the date as in my query as “mm/dd/yy” (when it is written&nbsp;&nbsp;as “dd/mm/yy”).&nbsp;&nbsp;At the moment the significant part of the SQL statement looks like this: Where ((Table1.Date)= #9/7/2000#)). <br><br>Can somebody please let me know what I need to do in the SQL query to make Access2000 read the date above as the 9th July instead of 7th Sept.<br><br>Thank You<br>
 
well, if you have Access, I may sugest you can try designing the Query in it's Query Viewer, then switch to SQL View to see the SQL statement used. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
<br>try this . . .<br><br>Where ((<b>Format</b>(&quot;dd/mm/yyyy&quot;,[Table1.Date]))= #9/7/2000#)). <br><br> <p>Amiel<br><a href=mailto:amielzz@netscape.net>amielzz@netscape.net</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top