Macros/General/005/en

Description
The function  takes file location path as input parameter string, and returns characters containing date and time of creation or last modification of a file. The result if no format is specified is: MM/DD/YYYY HH:MM:SS. For example.

This function was in fact subject to bug in some intermediate versions of LibreOffice.

The LibreOffice API allows you to circumvent this bug and also offers other powerful file access functions.

The example shown below shows how to retreive the date and time of creation or last modification for a file via the method getDateTimeModified.

The method takes in a URL, and returns a struct called DateTime. The displaying of the result is acheived by conversion via CDateFromUnoDateTime or by the function Format.

Code
In LibreOffice Basic: