问题描述
有没有办法设置一个查询,显示下班后和周末的数据? 我怎么会 创建一个查询,显示在数小时后发生的挂断和语音留言的数量。
is there a way to setup a query that will show data for after hours and weekends? How would I create a query that would show you how many hang-ups and voice messages happened after hours.
营业时间是上午6:00 - 下午4:30必须在[日期和时间]上执行此操作。剩下的时间]字段。 (这不是我的数据库,我只是被告知要创建一些报告)
hours of operation are 6:00 AM - 4:30 PM would have to do this on the [Date & Time Left] field. ( this isn't my database, I was just told to create some reports on it)
[code] SELECT [信息跟踪]。[日期和放大器;剩余时间],[留言追踪]。[退回日期],[留言追踪]。[客户类型]
FROM [留言追踪[/ code]
[code]SELECT [Message Tracking].[Date & Time Left], [Message Tracking].[Date Returned], [Message Tracking].[Customer Type]
FROM [Message Tracking[/code]
推荐答案
的标准WHERE TimeValue([Date& Time Left])< #06:00#或TimeValue([Date& Time Left])> #16:30#或工作日([日期和时间剩余])IN(1,7)
WHERE TimeValue([Date & Time Left]) < #06:00# OR TimeValue([Date & Time Left]) > #16:30# OR Weekday([Date & Time Left]) IN (1,7)
将返回以外的所有记录营业时间为周一至周五或周六和周日任何时间。这个标准可以用在Totals查询计数表中的记录中(当然我不知道表的结构......);您可以按
DateValue([Date& Time Left])进行分组,以计算每天的事件数或任何适当的分组数。
will return all records outside of business hours Monday through Friday or anytime Saturday and Sunday. This criterion could be used in a Totals query counting records in the table (of course I don't know the structure of the table...); you could group by DateValue([Date & Time Left]) to count incidents per day, or whatever grouping is appropriate.
这篇关于查询下班后和周末的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!