MS Access Format() Function
THE WORLD'S LARGEST WEB DEVELOPER SITE

MS Access Format() Function

❮ MS Access Functions

Example

Format a numeric expression to percent:

SELECT Format(0.5, "Percent") AS FormattedNum;
Try it Yourself »

Definition and Usage

The Format() function takes a numeric expression and returns it as a formatted string.

Syntax

Format(expression, format)

Parameter Values

Parameter Description
expression Required. The numeric expression to format
format Optional. The format to apply to the expression.
Format Description
General Number Displays a number without thousand separators
Currency Displays thousand separators as well as two decimal places
Fixed Displays at least one digit to the left of the decimal place and two digits to the right of the decimal place
Standard Displays the thousand separators, at least one digit to the left of the decimal place, and two digits to the right of the decimal place
Percent Displays a percent value - with a percent sign. Displays two digits to the right of the decimal place
Scientific Scientific notation
Yes/No Displays No if the number is 0 and Yes if the number is not 0
True/False Displays False if the number is 0 and True if the number is not 0
On/Off Displays Off if the number is 0 and On if the number is not 0

Technical Details

Works in: Access 2016, Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000

More Examples

Example

Format the "Price" column to currency:

SELECT Format(Price, "Currency") AS FormattedPrice
FROM Products;
Try it Yourself »

❮ MS Access Functions