Double不够吗?看看下面的代码:
Dim x As Double
Dim y As Double
x = CLng(3600) * CLng(24) * CLng(365)
Debug.Print x
y = 1000 ^ 100
Debug.Print y / x, y
x标识的是1年的秒数,是3千多万,再看看 y/x 的结果就知道了。而1000 ^ 100
还不是Double的上限,还差很远。
太简单了,但是秒数会大的吓人,恐怕 double也....
一分钟=60 second
一小时=3600 second
一天=878400 second
sec=秒数
day=sec\878400
hour=(sec-day*878400)\3600
min=(sec-day*878400-hour*3600)\60
second=(sec-day*878400-hour*3600*min*60)
a= 5 mod 3
a 就是商了