convert - Webapp

advertisement
Error! No text of specified style in document. - Error! No text of specified style in document.
1
CONVERT
2
Syntax:
3
CONVERT ( number , from-unit , to-unit )
4
Description: Converts a number from one measurement system to another.
5
Arguments:
Name
Type
Description
number
number
The value to be converted from from-units to to-units.
from-unit
text
The unit to be converted from, where the valid string
values are shown in the tables below.
to-unit
text
The unit to be converted to, where the valid string values
are shown in the tables below.
6
Weight and Mass
Unit String
Meaning
g
Gram
lbm
Pound mass (avoirdupois)
ozm
Ounce mass (avoirdupois)
sg
Slug
u
U (atomic mass unit)
7
Distance
Unit String
Meaning
ang
Angstrom
Error! No text of specified style in document. - Error! No text of specified style in document.
Distance
ft
Foot
in
Inch
m
Meter
mi
Statute mile
Nmi
Nautical mile
Pica
Pica (1/72 inch)
yd
Yard
1
Time
Unit String
Meaning
day
Day
hr
Hour
mn
Minute
sec
Second
yr
Year
2
Pressure
Unit String
Meaning
at or atm
Atmosphere
mmHg
mm of Mercury
Error! No text of specified style in document. - Error! No text of specified style in document.
Pressure
P or p
Pascal
1
Force
Unit String
Meaning
dy or dyn
Dyne
lbf
Pound force
N
Newton
2
Energy
3
Unit String
Meaning
BTU or btu
BTU
c
Thermodynamic calorie
cal
IT calorie
e
Erg
ev or eV
Electron volt
flb
Foot-pound
HPh or hh
Horsepower-hour
J
Joule
Wh or wh
Watt-hour
Error! No text of specified style in document. - Error! No text of specified style in document.
Power
Unit String
Meaning
H or hp
Horsepower
W or w
Watt
1
Magnetism
Unit String
Meaning
ga
Gauss
T
Tesla
2
Temperature
Unit String
Meaning
C or cel
Degrees Celsius
F or fah
Degrees Fahrenheit
K or kel
Degrees Kelvin
3
Liquid Measure
Unit String
Meaning
cup
Cup
gal
U.S. Gallon
l or lt
Liter
Error! No text of specified style in document. - Error! No text of specified style in document.
Liquid Measure
oz
Fluid ounce
ptor us_pt
U.S. pint
qt
U.S. Quart
tbs
Tablespoon
tsp
Teaspoon
uk_pt
U.K. pint
1
2
The following abbreviated unit prefixes can be used with any metric unit:
Abbreviated Unit Prefixes
Prefix String
Meaning
E
exa (1E+18)
P
peta (1E+15)
T
tera (1E+12)
G
giga (1E+09)
M
mega (1E+06)
k
kilo (1E+03)
h
hecto (1E+02)
e
dekao (1E+01)
d
deci (1E-01)
c
centi (1E-02)
Error! No text of specified style in document. - Error! No text of specified style in document.
Abbreviated Unit Prefixes
m
milli (1E-03)
u
micro (1E-06)
n
nano 1E-09)
p
pico (1E-12)
f
femto (1E-15)
a
atto (1E-18)
1
2
Unit names and prefixes are case-sensitive.
3
Return Type and Value: number – The value of number in from-units converted to to-units.
4
However, if
5
6
7
8
9



The value of from-unit or to-unit is invalid, #N/A is returned.
The from-unit and to-unit are from different measurement categories, #N/A is returned.
The value of from-unit or to-unit has an abbreviated unit prefix, yet none is supported for that unit,
#N/A is returned.
[Example:
10
11
12
13
14
15
16
17
18
CONVERT(10,"ozm","g") results in 283.4951521
CONVERT(1,"yd","mm") results in 914.4000003
CONVERT(1,"yd","cm") results in 91.44000003
CONVERT(1,"yd","m") results in 0.9144
CONVERT(1,"yd","km") results in 0.0009144
CONVERT(1,"mi","Nmi") results in 0.868976242
CONVERT(1,"day","sec") results in 86400
CONVERT(0,"K","C") results in -273.15
19
20
end example]
Download