添加日期标准 [英] Adding Date Criteria

查看:86
本文介绍了添加日期标准的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对昨天输入的采购订单进行简单查询。在条件框中,我使用日期() - 1 并且没有结果。为什么这不起作用?如果我删除标准,它将返回所有订单。

I''m doing a simple query for purchase orders that were entered yesterday. In the criteria box I use Date()-1 and get no results. Why is this not working? If I delete the criteria, it returns all orders.

推荐答案


我正在做一个简单的购买查询昨天输入的订单。在条件框中,我使用日期() - 1 并且没有结果。为什么这不起作用?如果我删除标准,它将返回所有订单。
I''m doing a simple query for purchase orders that were entered yesterday. In the criteria box I use Date()-1 and get no results. Why is this not working? If I delete the criteria, it returns all orders.



您的日期字段是否格式化为表格中的日期/时间?或者尝试使用Now() - 1作为标准。

Is your datefield formatted as Date/Time in the table? Or try Now()-1 as criteria.


现在()不起作用,它包括现在的时间。如果表中的字段是数据类型日期/时间
Now() won''t work, it includes time in Now. Date()-1 will work if the field in the table is of the data type Date/Time


感谢回复,则Date() - 1将起作用。

两者似乎都不起作用我试过> = Date() - 1 然后就可以了。不知道为什么,但确实如此。

再次感谢!
Thanks for the replies.
Neither seemed to work so I tried >=Date()-1 and that worked. Don''t know why, but it did.
Thanks Again!


这篇关于添加日期标准的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆