problemdm与ms访问和c#有关 [英] probledm realated to ms access and c#
本文介绍了problemdm与ms访问和c#有关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用小于和大于两个日期之间的过滤数据访问ms div
解决方案
尝试
SELECT * FROM MyTable WHERE MyDateColumn> #2013-12-01# AND MyDateColumn< =#2013-12-17#或者:
SELECT * FROM MyTable WHERE MyDateColumn BETWEEN #2013-12-01# AND #2013-12-17#
您可以使用格式
函数格式化日期。
< pre lang =SQL> SELECT * 来自 表 其中 DateField>格式(#@ DateField#,' mm / dd / yyyy');
SELECT * 来自 表 其中 DateField BETWEEN 格式( @ DateFrom ,' dd / mm / yyyy') AND 格式( @ DateTo ,' dd / mm / yyyy')
请点击此链接,它为您的问题提供了良好的解决方案。
http://office.microsoft。 COM / EN-001 /访问帮助/实例-的-使用-日期-AS-标准式访问的查询-HA102809751.aspx
how to use less than and greater than for filter tha data between two date in ms access
解决方案
Try
SELECT * FROM MyTable WHERE MyDateColumn > #2013-12-01# AND MyDateColumn <= #2013-12-17#Or:
SELECT * FROM MyTable WHERE MyDateColumn BETWEEN #2013-12-01# AND #2013-12-17#
You can useFormat
function to format the date.
SELECT * from Table where DateField > Format(#@DateField#,'mm/dd/yyyy');
WithBetween
SELECT * from Table where DateField BETWEEN Format(@DateFrom,'dd/mm/yyyy') AND Format(@DateTo,'dd/mm/yyyy')
please follow this link and it is provide good solution for your question and all.
http://office.microsoft.com/en-001/access-help/examples-of-using-dates-as-criteria-in-access-queries-HA102809751.aspx
这篇关于problemdm与ms访问和c#有关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文