MS Access Format() Function
❮ MS Access Functions
Example
Format the "Price" column to currency:
SELECT Format(Price, "Currency") AS FormattedPrice
FROM Products;
Try it Yourself »
Definition and Usage
The Format() function formats a string expression.
Syntax
Format(expression, format)
Parameter Values
Parameter |
Description |
expression |
Required. The string 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 |
General Date |
Displays date based on your system settings |
Long Date |
Displays date based on your system's long date settings |
Medium Date |
Displays date based on your system's medium date settings |
Short Date |
Displays date based on your system's short date settings |
Long Time |
Displays time based on your system's long time settings |
Medium Time |
Displays time based on your system's medium time settings |
Short Time |
Displays time based on your system's short time settings |
|
Technical Details
Works in: |
Access 2016, Access 2013, Access 2010, Access 2007, Access 2003, Access
XP, Access 2000 |
❮ MS Access Functions