Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在谷歌上搜索我找到了一个。是否可以使用 VBA 以 [h]:mm 格式格式化时间?
Dim currentTime As Date currentTime = TimeOfDay
当我转储数据时,我传入currentTime了数据库 - 显示 put put00.00.00.000000 不明白为什么它的显示不同?是否有任何其他功能可以调用当前时间00.00 AM/PM
currentTime
00.00.00.000000
00.00 AM/PM
要将当前时间格式化为您的规格,请尝试
MsgBox Format(Now(), "hh:mm AMPM")