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

根据日期查询access数据库

WBOY
Release: 2016-06-07 15:44:08
Original
1358 people have browsed it

获取指定日期的记录 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

      可以获取正确记录

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template