FileDateTime Function

ファイルが作成ないし最後に変更された日付および時刻を、文字列として返します。

構文:


FileDateTime (Text As String)

パラメーター:

Text: ファイルの位置を明示的に指定した文字列表式 (ワイルドカードは使用不可)。またURL 指定を用いることもできます。

この関数は、指定ファイルの作成ないし最終変更された時間を取得するもので、結果は「YYYY/MM/DD 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の書式コードは、個々のロケール設定に応じて、適切な表示に変換されます。

Error codes:

5 無効なプロシージャー呼び出しです

例:


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

ご支援をお願いします!