- Documentation
- Shared functions
- formatDate
Function
formatDate
Returns a date as text using a mask. Supports %d, %m, %Y, %y, %H, %M, %S and %%. Without a timestamp it uses the current time.
Syntax
string formatDate(string format [, int timestamp = nil])Arguments
formatstring- A mask, e.g.
"%d.%m.%Y %H:%M". timestampint, optional = nil- Time in seconds since 1970.
Returns
The date as text.
Example
outputChatBox("Serwer działa od " .. formatDate("%d.%m.%Y %H:%M"))