--- title: "stringFormat" description: "This expression returns a formatted string using the specified format string and arguments. Mainly, this expression is used for building dynamic string objects." --- # stringFormat > This expression returns a formatted string using the specified format string and arguments. Mainly, this expression is used for building dynamic string objects. **This function is used by Ignition's Expression language.** ## Description Refer to [Data Type Formatting Reference](appendix/reference-pages/data-type-formatting-reference/data-type-formatting-reference.md) for formatting elements. ## Syntax `stringFormat(format, [args, ...])` ### Parameters | Type | Parameter | Description | |---|---|---| | String | `format` | A string that contains formatting elements in it (%s, %d, %i). | | String | `args` | The arguments to use in the format. Must match the number of formatting elements in the string. [optional]| ### Results **String** - The new formatted string. ## Examples ```python title="Code Snippet" stringFormat("The boolean value is: %b", null) //Returns The boolean value is: False. ``` ```python title="Code Snippet" stringFormat("Hello %s", "world") //returns "Hello world" ``` ```python title="Code Snippet" stringFormat("%s, %s, %s", 1, 2, 3) //returns "1, 2, 3" ``` ```python title="Code Snippet" stringFormat("%d, %d, %d", 4, 5, 6) //returns "4, 5, 6" ``` ```python title="Code Snippet" stringFormat("Today is: %tA", now()) //Returns Today is: Tuesday. ``` ```python title="Code Snippet" stringFormat("The current month is: %tB", now()) //Returns The current month is: June. ```