Skip to main content

formatDate

Formats a date given in ISO-8601 format using the given formatter. The format can use a pattern specified in date-format-patterns

formatDate(date, pattern)

Parameters#

  • date: A date in ISO-8601 format such as 2021-06-12T11:03:49.701Z provided as string
  • pattern: A date formatter pattern

Returns#

  • formatted date as string

Example#

print(formatDate(timestamp(), f))# prints, Jun-Sat-2021 11:13:53 776 AM