z62678667
級別: 探索解密
|
圖片:
圖片:
組態王6.55里生成日報表用到函數ReportSetHistData和HTConvertTime,但是HTConvertTime只能到2019年。 現在進入了2020年,日報表不能正常運行了,求助各位大神如何解決? |
---|---|
|
chengdahai
大海
級別: 略有小成
|
|
---|---|
|
tkggtdkjpl
工欲善其事,必先利其器!
級別: 網絡英雄
|
當前年+當前月+當前日+當前時+當前分+當前秒,幾年前是這么用的,幾年后還沒解決這個問題? |
|
---|---|---|
|
liwenjiefa
級別: 探索解密
|
if (months == 1) monthsofdays = 0; if (months == 2) monthsofdays = 31; if (months == 3) monthsofdays = 59; if (months == 4) monthsofdays = 90; if (months == 5) monthsofdays = 120; if (months == 6) monthsofdays = 151; if (months == 7) monthsofdays = 181; if (months == 8) monthsofdays = 212; if (months == 9) monthsofdays = 243; if (months == 10) monthsofdays = 273; if (months == 11) monthsofdays = 304; if (months == 12) monthsofdays = 334; if (years % 4 ==0 && years % 100 !=0 || years % 400 ==0 && months >=3) ofdays = yearsofdays + monthsofdays + days; else ofdays = yearsofdays + monthsofdays + days - 1; if (hours >= 8) ofminites = ofdays * 24 * 60 + (hours - 8) * 60 + minites; if (hours < 8) ofminites = (ofdays - 1) * 24 * 60 + (hours + 16) * 60 + minites; //calculate resultszx; rest = ofminites * 60 + seconds; |
---|---|
|
z62678667
級別: 探索解密
|
我接觸組態王才幾年,當年的具體方案是什么? |
---|---|
|