Home  >  Article  >  Database  >  根据日期查询access数据库

根据日期查询access数据库

WBOY
WBOYOriginal
2016-06-07 15:44:081318browse

获取指定日期的记录 1.select Field1 from A where format("yyyy-MM-dd",Field1)=#2011-10-07# 有时不能获取记录 2.select Field1 from A where Year(Field1)=2011 and Month(Field1)=10 and Day(Field1)=7 可以获取正确记录 3.select Field1from A where Da

获取指定日期的记录

1.select Field1 from  A  where format("yyyy-MM-dd",Field1)=#2011-10-07#

   有时不能获取记录

2. select Field1 from  A  where Year(Field1)=2011 and Month(Field1)=10 and Day(Field1)=7

    可以获取正确记录

3.select Field1 from A where DateDiff('d',boaddate,#2011-10-7#)=0

      可以获取正确记录

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn