Using Date filter on table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am wanting to use the table filter-by-form feature to limit the rows to those that have a date greater than a given dat

When I try the filter '>= 25/12/2000' it fails

What is the corect syntax using this feature.
 
Hi

Thank you for posting in the community.

From your description, I understand that you would like to know use the table filter-by-form
feature to limit the rows. To do this, you can try use sharp marks (#) to wrap the date, instead
of using the single quotation marks .

You can use the following code to filter the data that have a date greater than a fiven date:

Where date >= #25/12/2000#


I also tested with the sample database Northwind, the following query worked fine:

select * from Employees where birthdate >= #02-06-1963#

and returned the expected results: The detailed informatin of Employees 1 3 6 9.


Please apply my suggestions above and let me know if this helps resolve your problem. If
there is anything more I can do to assist you, please feel free to post it in the group


Best regards,

Billy Yao
Microsoft Online Support
 
It doesn't works...
Every time you write a date in a "filter by form" field, Access adds a
" at the beginning and at the end of the condition.
This way all the SQL you write is wrong...
Any suggestions?

Thanks
Alessandro
 
I am wanting to use the table filter-by-form feature to limit the rows
to those that have a date greater than a given date

When I try the filter '>= 25/12/2000' it fails.

What is the corect syntax using this feature.


or

=#yyyy-mm-dd#

AccessXP seems to accept >=#dd/mm/yyyy# when the meaning is unambiguous
such as in your date above, but it is likely it will treat #02/01/2004# as
Feb 1, 2004
not
Jan 2, 2004.

I recommend #yyyy-mm-dd#
as it is clear and does not support the barbaric pratices of Anglo nations.
 
Back
Top