date

date([FORMAT: stringa])

Returns a string containing date and time formatted according to the given FORMAT, following the rules of the ANSI C function strftime. By default, it returns a reasonable date and time representation that depends on the host system and on the current locale.

 

Esempio 1. Esempio date

local s = date("%d/%m/%Y")
print("\ndata: " .. s)   -- es. "23/06/2026"