select (floor(days/7)*5+days%7 -case when 6 between wd and wd+days%7-1 then 1 else 0 end -case when 7 between wd and wd+days%7-1 then 1 else 0 end ) INTO str from (select datediff(e,s) as days,weekday(s)+1 as wd) as a; ELSE select (…
最近公司HR和Finance想算员工的工作天数,想让我帮忙写些VBA,自己从网上找了下代码,自己再改改,以下来自网络. 计算两个日期之间的工作日,用VBA,因量大,最好用数组做 Sub kk() Dim arr, i&, j&, m& arr = Sheet2.Range("b3:f4") To UBound(arr) m = ) ) Next arr(i, ) = m Next Sheet2.Range() = arr End Sub 根据他提供的方法,其实就…
#include<iostream> #include<string> #include<cstring> using namespace std; class Date { private: int year; int month; int day; public: void get() { int a,b,c; cin>>a; getchar(); cin>>b; getchar(); cin>>c; year=a; month=…