更新时间:2023-02-05 12:32:21
如果您首先创建一个日历表(每个日期一行),则要做起来会容易得多.然后,您可以使用该服务过滤掉周末,然后在预订有效的每一天都会得到一行结果.
It's going to be a lot simpler to do this if you first create a calendar table, with one row per date. You can use that then to filter out weekends, and you will get one row as a result for each of the days when the booking is valid.
之后,您只需要检查:
然后将所有其他天加起来8个小时(如果那是您的工作日).
Then just sum all other days with 8 hours, if that was your working day.