如何从另一个时间间隔中减去时间间隔 [英] How can I subtract a time interval from another time interval

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

问题描述





我有桌子Table1包含Fromdate和Todate Fields



Fromdate ToDate

--------- ---------------

12-FEB-15 01.30.59.000000 PM 12- FEB-15 04.30.59.000000 PM



i还有另一个表Table2它还包含fromdate和Todate字段。

表2必须有时间Table1 FromDate和TODATE。



Fromdate ToDate

--------- --------- ------

12-FEB-15 02.00.59.000000 PM 12-FEB-15 02.30.59.000000 PM



时差-30分钟



我想显示一个剩余时间列表(避免下午2点到2点30分),比如



1.30 PM - 2.00 pm

2.30 PM - 3.00 pm

3.00 PM - 3.30 pm

3.30下午4点 - 下午4点



如何获得此列表。



请帮助我,



提前致谢,



Vineeth @

Hi,

I have a table Table1 contain Fromdate and Todate Fields

Fromdate ToDate
--------- ---------------
12-FEB-15 01.30.59.000000 PM 12-FEB-15 04.30.59.000000 PM

i have another table Table2 it contain also fromdate and Todate fields.
Table2 must have the time in between of Table1 FromDate and TODATE.

Fromdate ToDate
--------- ---------------
12-FEB-15 02.00.59.000000 PM 12-FEB-15 02.30.59.000000 PM

Time difference -30 Mins

I want to show a list with remaining time (avoid 2 pm to 2.30 pm) like

1.30 P.M - 2.00 pm
2.30 P.M - 3.00 pm
3.00 P.M - 3.30 pm
3.30 P.M - 4.00 pm

How I get this list.

Please help me,

Thanks in advance ,

Vineeth@

推荐答案

您可以使用DateDiff()函数减去时间间隔
You can use DateDiff() function to subtract time interval


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

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