In This Topic
This function converts a number from one measurement system to its equivalent in another measurement system.
Syntax
CONVERT(number,from-unit,to-unit)
Arguments
This function has these arguments:
Argument |
Description |
number |
Numeric value to convert |
from-unit |
Convertible units (see table below) of numeric value to convert |
to-unit |
Convertible units (see table below) of desired result |
Remarks
In this context a measurement system is a set of units for different types of measurements. This function converts a number with one set of units to a number in different set of units.
An error value is returned if the convertible units (from-unit and to-unit) are invalid or are from different categories of unit types (different tables below).
The following tables list the convertible units by their unit type:
Weight and Mass Unit Type |
Convertible Units |
Gram |
"g" |
Slug |
"sg" |
Pound Mass |
"lbm" |
U |
"u" |
Ounce Mass |
"ozm" |
Distance Unit Type |
Convertible Units |
Meter |
"m" |
Statute mile |
"mi" |
Nautical mile |
"Nmi" |
Inch |
"in" |
Foot |
"ft" |
Yard |
"yd" |
Angstrom |
"ang" |
Pica (1/72 in.) |
"Pica" |
Time Unit Type |
Convertible Units |
Year |
"yr" |
Day |
"day" |
Hour |
"hr" |
Minute |
"mn" |
Second |
"sec" |
Pressure Unit Type |
Convertible Units |
Pascal |
"Pa" |
Atmosphere |
"atm" |
mm of Mercury |
"mmHg" |
Force Unit Type |
Convertible Units |
Newton |
"N" |
Dyne |
"dyn" |
Pound force |
"lbf" |
Energy Unit Type |
Convertible Units |
Joule |
"J" |
Erg |
"e" |
Thermodynamic calorie |
"c" |
IT calorie |
"cal" |
Electron volt |
"eV" |
Horsepower-hour |
"Hph" |
Watt-hour |
"Wh" |
Foot-pound |
"flb" |
BTU |
"BTU" |
Power Unit Type |
Convertible Units |
Horsepower |
"HP" |
Watt |
"W" |
Magnetism Unit Type |
Convertible Units |
Tesla |
"T" |
Gauss |
"ga" |
Temperature Unit Type |
Convertible Units |
Degree Celsius |
"C" |
Degree Fahrenheit |
"F" |
Degree Kelvin |
"K" |
Liquid Measure Unit Type |
Convertible Units |
Teaspoon |
"tsp" |
Tablespoon |
"tbs" |
Fluid ounce |
"oz" |
Cup |
"cup" |
U.S. pint |
"pt" |
U.K. pint |
"uk_pt" |
Quart |
"qt" |
Gallon |
"gal" |
Liter |
"l" |
Data Types
Accepts numeric and string data. Returns numeric data.
Examples
CONVERT(68,"F","C")
Version Available
This function is available in product version 2.0 or later.
See Also
OCT2BIN | HEX2DEC | DEC2OCT | Engineering Functions