如何在不包括周末的时间戳之间缓解差异 [英] How Do I Calucate Diference Between Timestamps Excluding Weekends
本文介绍了如何在不包括周末的时间戳之间缓解差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
@startTime = 2015-05-30 13:07:29.090
@endTime = 2015-06-05 18:08:58.397
i有开始时间和结束时间,通常它会返回差异为'6.5.1.59'。
但是我需要计算周六和星期日之间的计算。
请帮忙。
提前致谢。
解决方案
DateDiff是你的朋友,例如 http://www.sqlservercentral.com/Forums /Topic1440451-392-1.aspx [ ^ ]
@startTime =2015-05-30 13:07:29.090
@endTime = 2015-06-05 18:08:58.397
i have starttime and endtime and normally it will return difference as '6.5.1.59'.
But i need the calculation exlcuding saturday & sunday which comes in between.
Please help.
Thanks in advance.
解决方案
DateDiff is your friend, example here http://www.sqlservercentral.com/Forums/Topic1440451-392-1.aspx[^]
这篇关于如何在不包括周末的时间戳之间缓解差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文