Query95: Error Message: "Syntax Error in Query..." Performing Query with a Date

ID: Q249177


The information in this article applies to:
  • Microsoft Query for Windows 95, version 2.0


SYMPTOMS

When you enter a date in the Criteria pane of your query, you receive an error message similar to one of the following:

Syntax error [missing operator] in query expression '(<Table Name>.<Fieldname>=ts '100-07-04 00:00:00'})'.
-or-
Syntax error in query expression '(<Table Name>.<Fieldname>=ts '100-0)'.

where <Table Name> is the name of the table and <Fieldname> is the name of the field that you are querying.

NOTE: This error message will vary according to the version of Microsoft Data Access Components installed. It also will vary depending on the driver.


CAUSE

This issue will occur when the following conditions are true:

  • You enter a date value that does not include the year.


  • -and-

  • The current date setting on your computer is later than December 31, 1999.


WORKAROUND

To work around the issue, always specify the year portion of the date when your system clock is set to a date later than December 31, 1999.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

For more information about how Microsoft products are affected by year 2000 (Y2K) issues, please see the following Microsoft World Wide Web site:

http://www.microsoft.com/year2000/

Additional query words: XL2000 y2k

Keywords : kbdta kb2000 xlquery
Version : WINDOWS:2.0
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: January 3, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.