Formats a string according to strftime, similar to unix strftime.

asstringtrue Specifies the output field.
fieldstringfalse@timestampWhere to get the current time.
formatstringtrue Format string. See Java documentation for valid Date/Time escapes.
localestringfalse Specifies the locale such as US or en_GB.
timezonestringfalse Specifies the timezone such as GMT, EST or Europe/London. See the full list of supported timezones.


Format time as 2021/11/26 06:54:45 using the timestmp field and UTC timezone using assignment to fmttime:

time := formatTime("%Y/%m/%d %H:%M:%S", field=@timestamp, locale=en_US, timezone=Z)

Format time as Thursday 18 November 2021, 22:59 using US locale and PST timezone using the as parameter to fmttime

formattime("%A %d %B %Y, %R", as=fmttime, field=@timestamp, timezone=PST)