如何在使用datediff时排除星期六和星期日 [英] How to exclude Saturday and Sunday when using datediff

查看:165
本文介绍了如何在使用datediff时排除星期六和星期日的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要计算订单从订单日期开始的时间。到DateReceived,但在我的公式中排除星期六和星期日。有什么建议吗?

I need to calculate how long an order takes from the "OrderDate" to "DateReceived", but exclude Saturday and Sunday in my formula. Any suggestions?

展开 | 选择 | Wrap | 行号

推荐答案

- 营业日:
-Business Days:
  • Microsoft Access / VBA Insights Sitemap >>
  • 60: HowTo: Calculate business days - pure SQL approach.
  • (MSN) Counting the Number of Working Days in Access 2007


如果您只需要估算,请将数字乘以5/7。


如果它需要准确,减去2整数除以7的数字,然后取周数日数,从7减去它,如果它大于数字,减去2。
If you only need an estimate, multiply the number by 5/7.

If it needs to be accurate, subtract 2 times the number integer divided by 7, then take the week day number, subtract it from 7, and if it''s bigger than the number, subtract 2.


兔子,为什么我没想到这个?!
Rabbit, Why didn''t I think of that?!


这篇关于如何在使用datediff时排除星期六和星期日的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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