Format

Overview

Formats a string value as specified

Syntax

Format(1, 2)

Function Properties

Ordinal Type Description
1 string Required String value to format
2 string Required Format to apply to string. Choose MM/dd/yyyy or Cn, where n represents the number of decimal places in the currency value.

Example

In this sample code, the first function takes the string and applies the MM/dd/yyyyformat to it. The second function applies two decimal places to the string.

Format(Now(),"MM/dd/yyyy");
Format(55, "C2"); // Returns "55.00"
Last Updated: Jun 8, 2021