如果日期/时间包括日期和时间,则计算工作周日 [英] calculate works sundays if date/time include both date and time
问题描述
在我的表日期/时间字段(starttime,endtime)中包括日期和时间。如何计算每周工作的员工的查询工作时间?
的例子:
有时候是starttime,endtime是星期日,有时只有endtime是星期日
的考试:
eployee starttime endtime timeout
patric Jo .. 12/03/2006 21:00:00 13/03 / 2006 02:00:00 01:00:00
patric jo .. 25/03/2006 10:00:00 25/03/200614:00:00 02:00:00
In my table date/time field (starttime,endtime) include both date and time. How can I calculate worktime in query for each employee who works sundays?
for an example:
sometimes starttime and endtime is sunday and sometimes only endtime is sunday
for an examlpe:
eployee starttime endtime timeout
patric Jo.. 12/03/2006 21:00:00 13/03/2006 02:00:00 01:00:00
patric jo.. 25/03/2006 10:00:00 25/03/200614:00:00 02:00:00
推荐答案
在我的表日期/时间字段(starttime,endtime)中包括日期和时间。如何计算每周工作的员工的查询工作时间?
的例子:
有时候是starttime,endtime是星期日,有时只有endtime是星期日
的考试:
eployee starttime endtime timeout
patric Jo .. 12/03/2006 21:00:00 13/03 / 2006 02:00:00 01:00:00
patric jo .. 25/03/2006 10:00:00 25/03/200614:00:00 02:00:00
In my table date/time field (starttime,endtime) include both date and time. How can I calculate worktime in query for each employee who works sundays?
for an example:
sometimes starttime and endtime is sunday and sometimes only endtime is sunday
for an examlpe:
eployee starttime endtime timeout
patric Jo.. 12/03/2006 21:00:00 13/03/2006 02:00:00 01:00:00
patric jo.. 25/03/2006 10:00:00 25/03/200614:00:00 02:00:00
例如:
For example:
例如:
For example:
我在桌子上有三个计算周日的案例
1如果日期从星期六开始到星期日结束
2如果日期从星期日开始到星期日结束
3如果日期从星期日开始到星期一结束
为例:
peter jo .. 12/03/2006 07:00: 00 12/03/2006 15:00:00
peter jo .. 11/03/2006 21:00.00 12/03/2006 03:00:00
peter乔.. 2006年3月12日22:00:00 13/03/2006 01:00:00
如果2006年3月12日星期日如何在一个函数中计算所有这些情况?
I have three cases for calculation sunday in my table
1 if date beginning on saturday and ending on sunday
2 if date beginning on sunday and ending on sunday
3 if date beginning on sunday and ending on monday
for an example:
peter jo.. 12/03/2006 07:00:00 12/03/2006 15:00:00
peter jo.. 11/03/2006 21:00.00 12/03/2006 03:00:00
peter jo.. 12/03/2006 22:00:00 13/03/2006 01:00:00
if 12/03/2006 is sunday how can I calculate all this cases in one function?
我需要更多信息。
您希望何时何地进行此计算。在查询中,控制表单等?
如何计算超时?
你想要计算什么? ?没有几天,几小时或什么?
I need more information.
When and where do you want this calculation to take place. In a query, control on a form, etc?
How is time out included in the calculation?
What are you trying to calculate? No of days, hours, or what?
这篇关于如果日期/时间包括日期和时间,则计算工作周日的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!