如何计算时间间隔 [英] How to calculate time interval

查看:56
本文介绍了如何计算时间间隔的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。我和微软Access一样是这个论坛的新手。


我正在我工作的律师事务所工作。基本上我的表格显示了特定人的所有销售点(收银机)交易。它有以下列:商店号码;日期;时间,票号,金额$;小计;税;和员工ID。


我想要做的是能够证明这个特定的员工总是在做销售,因此从不会超过30分钟。


例如:第一笔交易显示,例如,在01/06/2001上午10:01进行了销售。第二笔交易显示,另一笔交易是在01/06/2001上午10:16进行的。第三笔交易是在上午10:22进行的另一次销售。桌子一直在继续。


我是什么需要做的是能够找到一种方法来创建一个查询(我认为),其中一列将显示第一个事务和第二个事务之间的时间;第二次交易和第三次交易之间的时间....依此类推。


我可以通过看到明显在第一次和第二次销售之间间隔为15分钟来手动完成第二次和第三次销售之间的时间是6分钟。然而,这个表格相当冗长,我想知道Access是否能以任何方式帮助我。


我非常感谢任何帮助。

Hello everyone. I am as new to this forum as I am to Microsoft Access.

I am working on a case at the law firm I work at. Basically the table I have shows all point of sale (cash register) transactions for a particular person. It has the following columns: Store Number; Date; Time, Ticket Number, Amount $; Subtotal; Tax; and Employee ID.

What I want to do is be able to show that this particular employee was always making sales and therefore was never away from the register more than 30 minutes.

For example: the first transaction shows that on, say, 01/06/2001 at 10:01 am a sale was made. The second transaction shows that another sale was made on 01/06/2001 at 10:16 a.m. The third shows another sale at 10:22 a.m. The table goes on forever.

What I need to do is be able to find a way to create a query (I think) wherein a column will show the time between the first transaction and the second transaction; the time between the second transaction and the third....and so on.

I can do it manually by just seeing that obviously between the 1st and 2nd sale the interval was 15 minutes and the time between the 2nd and 3rd sale was 6 minutes. However, the table is quite lengthy and I would like to know if Access could help me out in any way.

I would GREATLY appreciate any help.

推荐答案

;小计;税;和员工ID。


我想要做的是能够证明这个特定的员工总是在做销售,因此从不会超过30分钟。


例如:第一笔交易显示,例如,在01/06/2001上午10:01进行了销售。第二笔交易显示,另一笔交易是在01/06/2001上午10:16进行的。第三笔交易是在上午10:22进行的另一次销售。桌子一直在继续。


我是什么需要做的是能够找到一种方法来创建一个查询(我认为),其中一列将显示第一个事务和第二个事务之间的时间;第二次交易和第三次交易之间的时间....依此类推。


我可以通过看到明显在第一次和第二次销售之间间隔为15分钟来手动完成第二次和第三次销售之间的时间是6分钟。然而,这张桌子非常冗长,我想知道Access是否能以任何方式帮助我。


我非常感谢任何帮助。
; Subtotal; Tax; and Employee ID.

What I want to do is be able to show that this particular employee was always making sales and therefore was never away from the register more than 30 minutes.

For example: the first transaction shows that on, say, 01/06/2001 at 10:01 am a sale was made. The second transaction shows that another sale was made on 01/06/2001 at 10:16 a.m. The third shows another sale at 10:22 a.m. The table goes on forever.

What I need to do is be able to find a way to create a query (I think) wherein a column will show the time between the first transaction and the second transaction; the time between the second transaction and the third....and so on.

I can do it manually by just seeing that obviously between the 1st and 2nd sale the interval was 15 minutes and the time between the 2nd and 3rd sale was 6 minutes. However, the table is quite lengthy and I would like to know if Access could help me out in any way.

I would GREATLY appreciate any help.



大家好。我和微软Access一样是这个论坛的新手。


我正在我工作的律师事务所工作。基本上我的表格显示了特定人的所有销售点(收银机)交易。它有以下列:商店号码;日期;时间,票号,金额
Hello everyone. I am as new to this forum as I am to Microsoft Access.

I am working on a case at the law firm I work at. Basically the table I have shows all point of sale (cash register) transactions for a particular person. It has the following columns: Store Number; Date; Time, Ticket Number, Amount


;小计;税;和员工ID。


我想要做的是能够证明这个特定的员工总是在做销售,因此从不会超过30分钟。


例如:第一笔交易显示,例如,在01/06/2001上午10:01进行了销售。第二笔交易显示,另一笔交易是在01/06/2001上午10:16进行的。第三笔交易是在上午10:22进行的另一次销售。桌子一直在继续。


我是什么需要做的是能够找到一种方法来创建一个查询(我认为),其中一列将显示第一个事务和第二个事务之间的时间;第二次交易和第三次交易之间的时间....依此类推。


我可以通过看到明显在第一次和第二次销售之间间隔为15分钟来手动完成第二次和第三次销售之间的时间是6分钟。然而,这个表格非常冗长,我想知道Access是否能以任何方式帮助我。


我非常感谢任何帮助。
; Subtotal; Tax; and Employee ID.

What I want to do is be able to show that this particular employee was always making sales and therefore was never away from the register more than 30 minutes.

For example: the first transaction shows that on, say, 01/06/2001 at 10:01 am a sale was made. The second transaction shows that another sale was made on 01/06/2001 at 10:16 a.m. The third shows another sale at 10:22 a.m. The table goes on forever.

What I need to do is be able to find a way to create a query (I think) wherein a column will show the time between the first transaction and the second transaction; the time between the second transaction and the third....and so on.

I can do it manually by just seeing that obviously between the 1st and 2nd sale the interval was 15 minutes and the time between the 2nd and 3rd sale was 6 minutes. However, the table is quite lengthy and I would like to know if Access could help me out in any way.

I would GREATLY appreciate any help.



我认为这很难通过查询完成,但我会让一些更熟练的SQL熟练主持人/专家看看他们看到了什么想出来。我可以通过代码路由找到解决方案,但我会再次看到有人想出一个更好的解决方案。现在,我要去度假,但我会在几天后再回来。

I think this would be difficult to accomplish via a Query, but I''ll let some of the more SQL Proficient Moderators/Experts have a look and see what they come up with. I can probably arrive at a solution via the code route, but again I''ll see if someone comes up with a better solution first. Right now, I''m going on Vacation but I''ll check back in a couple of days.


这篇关于如何计算时间间隔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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