1. Fix() Function :
In MS Access, the fix() function returns the integer part of a number. In this function, a number will be pass as a parameter and it will return the integer part of that number.
Syntax :
Fix(number)
Example-1 :
SELECT Fix(-75.43) AS FixNum;
Output –
| FixNum |
|---|
| -75 |
Example-2 :
SELECT Fix(23.93) AS FixNum;
Output –
| FixNum |
|---|
| 23 |
2. Format() function :
In MS Access, the format function will return a number in a specified format. In this function, the value will be passed as the first parameter and the format will be pass as second parameter. And it will return the converted format.
| Format | Description |
|---|---|
| General Number | For without thousand separators. |
| Standard | For thousand separators + two digits to the right of the decimal place and minimum one digit to the left of the decimal place. |
| Percent | For percent value. |
| Scientific | For scientific value. |
| Fixed | For one digit to the left of the decimal place and two digits to the right of the decimal place. |
| Currency | For currency, with thousand separators and two decimal places. |
| Yes/No | If value==0 then no otherwise yes. |
| True/False | If value==0 then True otherwise False. |
| On/Off | If value==0 then Off otherwise On. |
Syntax :
Format(value, format)
Example-1 :
SELECT Format(0.55, "Percent") AS FormattedPercentage;
Output –
| FormattedPercentage |
|---|
| 55.00% |
Example-2 :
SELECT Format(0.0000000004500121424255, "Scientific") AS FormattedScientific;
Output –
| FormattedScientific |
|---|
| 4.50E-10 |

