If one in North America uses the "Insert Filename and Date/Time" macro he/she would get say
File Name: D:\Documents and Settings\arthur\My Documents\ProjectXYZ\FTP_Files.bat
Date/Time: 18 January 2012 15:19 PM
1st: Date/Time it has the / which bears a special meaning in most prog languages.
2nd: 18 January 2012 15:19 PM is not a correct format.
In North America this needs to be
January 18 2012 03:19 PM
I suggest to abbreviate the month to to Jan. 18 2012 3:19 PM. Perhaps PC locale needs to be used here?
3rd: So why do I get the complete path? Well, the name of the macro I would like: "Insert File Name and Date" and it would give me -
File: FTP_Files.bat Date: Jan. 18 2012 03:19 PM
Insert File Name and Date/Time Macro - formatting is odd
This menu runs the file_date.lua macro. To see the macro code use the Macros, Load menu, select the file_date.lua macro and then use the Macros, View Source menu."Insert Filename and Date/Time" macro
Since this information is generated by a macro it is fully configurable1st: Date/Time it has the / which bears a special meaning in most prog languages.

The macro formats the date an time using these Windows formatting patterns:2nd: 18 January 2012 15:19 PM is not a correct format.
Code: Select all
local current_date = macro_tag("$DT<d MMMM yyyy> ")
local current_time = macro_tag("$T<HH:mm tt> ")
Code: Select all
local current_date = macro_tag("$DT<MMM dd yyyy> ")
local current_time = macro_tag("$T<hh:mm tt> ")
The macro format formats the file name using this code:3rd: So why do I get the complete path?
Code: Select all
-- get file details using macro tags (see online help for more details)
local filename = macro_tag("$FN")
Code: Select all
-- get file details using macro tags (see online help for more details)
local filename = macro_tag("$F")