FormatTime Function

Produces a date and/or time string value for a timestamp.

See this URL for valid parameters:

Note that available parameters depends on support from your operating system. In particular, ones highlighted in yellow on that page are not currently available on Windows and should be avoided for portable plugins.

void FormatTime(char[] buffer, int maxlength, const char[] format, int stamp)


char[] buffer

Destination string buffer.

int maxlength

Maximum length of output string buffer.

const char[] format

Formatting rules (passing NULL_STRING will use the rules defined in sm_datetime_format).

int stamp

Optional time stamp.


Buffer too small or invalid time format.