Builtin

to_str

to_str(a) to_str(a, format)

Returns the value of a converted to a string.

If format is given it is treated as a format string. See print for details.

For bool, false="false" and true="true".

Examples

int
to_str(0)
0

float
to_str(0.0)
0

time
to_str(@2026-07-04T21:15:00Z)
2026-07-04T21:15:00Z

time with format
to_str(@2026-07-04T21:15:00Z, ":02/01/2006 15:04t")
04/07/2026 21:15

float with format
to_str(3.14159, ":.3f")
3.142