sean168

Access时间查询

--1     我想查询出所有从2004年11月4日到2005年1月3日的数据,如何查询?  
  select   *   from   tablename   where   format(DateField,"yyyy-mm-dd")   between   "2004-11-04"   and   "2005-01-03"  
   
  --2     还有如何查询出所有为2004-4-4日的数据呢?  
   
  select   *   from   tablename   where   format(DateField,"yyyy-mm-dd"   )="2004-04-04"  
   
  --3     如何查询出所有2004年4月的数据呢?  
  select   *   from   tablename   where   format(DateField,"yyyy-mm"   )="2004-04"  

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2021-12-23
相关资源
相似解决方案