Private Sub Command1_Click()
Dim s As Long
Dim y As Long
Dim m As Long
Dim d As Long
Dim h As Long
Dim min As Long
Dim sec As Long
Dim temp1 As Long
Dim temp2 As Long
s = CLng(Text1.Text)
sec = s Mod 60
Text2.Text = CStr(sec) & "秒"
s = (s - sec) / 60
min = s Mod 60
Text3.Text = CStr(min) & "分"
s = (s - min) / 60
h = s Mod 24
Text4.Text = CStr(h) & "时"
s = (s - h) / 24
d = s Mod 30
Text5.Text = CStr(d) & "日"
s = (s - d) / 30
m = s Mod 12
Text6.Text = CStr(m) & "月"
s = (s - m) / 12
y = s
Text7.Text = CStr(y) & "年"
End Sub
这是VB写的程序,月份按30天算(因为你将来的不是日期,而是时间,所以无法按正常日期计算,如果只计算天数的话就没有这个问题),每年按360天计算
您的产品我们公司可以做,以下是我们的部分产品,如果有需要,请咨询:
MAC小三通电磁阀:http://www.mac-valves.com/smallthree/
MAC大三通电磁阀:http://www.mac-valves.com/dasantong/
MAC小四通电磁阀:http://www.mac-valves.com/xiaosi/
MAC大四通电磁阀:http://www.mac-valves.com/dasitong/
MAC iSO阀:http://www.mac-valves.com/iso/
MAC迷你阀:http://www.mac-valves.com/weixing/