Tutorials References Exercises Bootcamps Videos Menu
Sign Up Create Website Get Certified Upgrade

SQL Tutorial

SQL HOME SQL Intro SQL Syntax SQL Select SQL Select Distinct SQL Where SQL And, Or, Not SQL Order By SQL Insert Into SQL Null Values SQL Update SQL Delete SQL Select Top SQL Min and Max SQL Count, Avg, Sum SQL Like SQL Wildcards SQL In SQL Between SQL Aliases SQL Joins SQL Inner Join SQL Left Join SQL Right Join SQL Full Join SQL Self Join SQL Union SQL Group By SQL Having SQL Exists SQL Any, All SQL Select Into SQL Insert Into Select SQL Case SQL Null Functions SQL Stored Procedures SQL Comments SQL Operators

SQL Database

SQL Create DB SQL Drop DB SQL Backup DB SQL Create Table SQL Drop Table SQL Alter Table SQL Constraints SQL Not Null SQL Unique SQL Primary Key SQL Foreign Key SQL Check SQL Default SQL Index SQL Auto Increment SQL Dates SQL Views SQL Injection SQL Hosting SQL Data Types

SQL References

SQL Keywords MySQL Functions SQL Server Functions MS Access Functions SQL Quick Ref

SQL Examples

SQL Examples SQL Editor SQL Quiz SQL Exercises SQL Bootcamp SQL Certificate

MS Access Format() Function


Format a numeric expression to percent:

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

Definition and Usage

The Format() function formats a numeric value with the specified format.


Format(value, format)

Parameter Values

Parameter Description
value Required. The numeric value to format
format Optional. The format to to use.
Format Description
General Number Indicates a number, without thousand separators
Currency Indicates currency, with thousand separators and two decimal places
Fixed Shows minimum one digit to the left of the decimal place and two digits to the right of the decimal place
Standard Shows the thousand separators + minimum one digit to the left of the decimal place, and two digits to the right of the decimal place
Percent Shows a percent value (with percent sign) and two digits to the right of the decimal place
Scientific Indicates scientific notation
Yes/No Shows No if value = 0 and Yes if value <> 0
True/False Shows False if value = 0 and True if value <> 0
On/Off Shows Off if value = 0 and On if value <> 0

Technical Details

Works in: From Access 2000

More Examples


Format the "Price" column to currency:

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