Skip to main content

FORMAT

Returns a string value formatted with the specified format. Can be used for formatting DateTime and number values as strings or entering data into pre-defined text.

Syntax

string FORMAT(string format, params object[] args)

Inputs

ObjectData TypeDescription
formatStringA template string.
object[]StringList of string values to insert into the template.

Example

FORMAT("Value1: {0}, Value2: {1}", Value1, Value2)

FORMAT("{0}, {1}", LastName, FirstName)

This example will return a list of names in the format LastName, FirstName.


Alternatively you can enter column data into a sentence. This might be useful for populating letters or customised taglines for example.

FORMAT("{0} is a beautiful city in {1}", CityName, StateName)

Will return "[CityName] is a beautiful city in [StateName]" pulling the CityName from the CityName column and the StateName from the StateName column.

Please also refer to the MSDN page String.Format Method for more information as this is what this function is based upon.