FormatTime

Last Updated2022-09-19
Created At2007-07-04

Produces a date and/or time string value for a timestamp. See this URL for valid parameters: https://cplusplus.com/reference/ctime/strftime/ 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.

native void FormatTime(char[] buffer, int maxlength, const char[] format, int stamp = -1)

Parameters

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.

Return Value

void

Error

Buffer too small or invalid time format.