FileDateTime 函数

以字符串的形式返回创建文件或最后一次修改文件的日期与时间。

语法:


FileDateTime (Text As String)

参数:

Text」: 含有明确 (无通配符) 文件定义的任意字符串表达式。您也可以使用 URL 表示法

此函数确定创建文件或最后一次修改文件的确切时间,返回格式为 "MM.DD.YYYY HH.MM.SS"。

You can set the locale used for controlling the formatting numbers, dates and currencies in LibreOffice Basic in - Languages and Locales - General. In Basic format codes, the decimal point (.) is always used as placeholder for the decimal separator defined in your locale and will be replaced by the corresponding character.

同样适用于日期、时间和货币格式的区域设置。Basic 格式的代码的解释和显示将遵循您的区域设置。

错误代码:

5 无效的过程调用

示例:


Sub ExampleFileDateTime
    MsgBox FileDateTime("C:\autoexec.bat")
End Sub

请支持我们!