gpt4 book ai didi

VBA - 以小于一秒的精度显示时钟时间

转载 作者:行者123 更新时间:2023-12-04 13:15:22 24 4
gpt4 key购买 nike

有没有办法使用 VBA (excel) 生成精确到十分之一秒或更短的时钟时间?

例如:

Sub test()
MsgBox Format(Time, "hh:mm:ss???") 'not sure what this format should be...
End Sub

最佳答案

我认为 Time不提供该信息。

您可以使用 Timer以获得额外的准确性。

In Microsoft Windows the Timer function returns fractional portions of a second. On the Macintosh, timer resolution is one second.



这是一个例子:
MsgBox Format(Time, "hh:mm:ss:" & Right(Format(Timer, "#0.00"), 2))

关于VBA - 以小于一秒的精度显示时钟时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1470632/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com