Time 函数Time function

返回一个指示当前系统时间的 Variant (Date)。Returns a Variant (Date) indicating the current system time.

语法Syntax

TimeTime

备注Remarks

若要设置系统时间, 请使用**time** 语句。To set the system time, use the Time statement.

示例Example

此示例使用 Time 函数返回当前系统时间。This example uses the Time function to return the current system time.

Dim MyTime
MyTime = Time    ' Return current system time.

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.