3.14

@@Format

Use @@Format when you want to specify a custom format to a number or date.

Syntax:

@@Format(<token>, <mask>)

Parameters:

<token>

The token you are formatting.

<mask>

The formatting you are applying. Formatting is set using one of the following notations, placed within single quotes.

#0

formats to a whole number, rounding any decimal; does not insert thousands separators.

#,#0

formats to a whole number, rounding any decimal and inserts thousands separators.

#0.##

formats to a decimal number; does not insert thousands separators.

#,#0.##

formats to a decimal number and inserts thousands separators.

#

formats as a number of digits equal to the number of hashmarks. If there are more hashmarks than digits, additional hashmarks are ignored. For example, ### will display the first three digits

m

formats month as a single digit (1-12).

mm

formats month as two digits (01-12).

mmm

formats month as standard three-letter abbreviation (Jan, Feb, Mar, etc.)

mmmm

formats month as full month name (January, February, March, etc.)

d

formats day as single digit (1-13)

dd

formats day as two digits (01-31)

yy

formats year as last two digits (22)

yyyy

formats full year (2022)

Note: You can include spaces, commas, dashes, parentheses, and slashes as part of the formatting.

Examples

@@Format(#Rates.SpRateEE, ‘#,#0.##’)
@@Format(#MDSLPolicy.AccountZip, ‘#####-####’)
@@Format(#MDSLPolicy.AccountPhone, ‘(###) ###-####’)
@@Format(#MDSLPolicy.EffectiveDate, ‘m/d/yyyy’)
@@Format(#MDSLPolicy.ExpirationDate, ‘mmmm d, yyyy’)