|
|
Line 307: |
Line 307: |
| ==Examples== | | ==Examples== |
| {| class="wikitable" | | {| class="wikitable" |
− | |- class="even"
| |
− | !Equation
| |
− | ! Number
| |
− | ! Fromunit
| |
− | ! Tounit
| |
− | ! Result
| |
− | |- class="odd"
| |
− | |CONVERT(10,"ozm","sg")
| |
− | | 10
| |
− | | ozm
| |
− | | sg
| |
− | | 0.019425668878
| |
− | |- class="even"
| |
− | | CONVERT(30,"lbm","kg")
| |
− | | 30
| |
− | | lbm
| |
− | | kg
| |
− | | 13.60776929
| |
− | |- class="odd"
| |
− | | CONVERT(0.5,"mi","m")
| |
− | | 0.5
| |
− | | mi
| |
− | | m
| |
− | | 804.6077
| |
− | |- class="even"
| |
− | | CONVERT(0.002,"km","Nmi")
| |
− | | 0.002
| |
− | | km
| |
− | | Nmi
| |
− | | 0.001079
| |
− | |- class="odd"
| |
− | | CONVERT(5,"ft","in")
| |
− | | 5
| |
− | | ft
| |
− | | in
| |
− | | 60
| |
− | |- class="even"
| |
− | | CONVERT(7,"yd","ang")
| |
− | | 7
| |
− | | yd
| |
− | | ang
| |
− | | 64007999999.9
| |
− | |- class="odd"
| |
− | | CONVERT(5,"yd","Pica")
| |
− | | 5
| |
− | | yd
| |
− | | Pica
| |
− | | 12959.99
| |
− | |- class="even"
| |
− | | CONVERT(15,"Pa","mmHg")
| |
− | | 15
| |
− | | Pa
| |
− | | mmHg
| |
− | | 0.112509
| |
− | |- class="odd"
| |
− | | CONVERT(4, "yr","day")
| |
− | | 4
| |
− | | yr
| |
− | | day
| |
− | |1461
| |
− | |- class="even"
| |
− | | CONVERT(1.5,"mn","sec")
| |
− | | 1.5
| |
− | | mn
| |
− | | sec
| |
− | | 90
| |
− | |- class="odd"
| |
− | | CONVERT(15,"lbf","N")
| |
− | | 15
| |
− | | lbf
| |
− | | N
| |
− | |66.72333
| |
− | |- class="even"
| |
− | | CONVERT(10,"BTU","J")
| |
− | | 10
| |
− | | BTU
| |
− | | J
| |
− | |10550.581
| |
− | |- class="odd"
| |
− | | CONVERT(15,"W","HP")
| |
− | | 15
| |
− | | W
| |
− | | HP
| |
− | |0.020115301
| |
− | |- class="even"
| |
− | | CONVERT(45,"T","ga")
| |
− | | 45
| |
− | | T
| |
− | | ga
| |
− | | 450000
| |
− | |- class="odd"
| |
− | | CONVERT(90,"degF","degK")
| |
− | | 90
| |
− | | degF
| |
− | | degK
| |
− | | 305.3722222
| |
− | |- class="even"
| |
− | | CONVERT(100,"oz","cup")
| |
− | | 100
| |
− | | oz
| |
− | | cup
| |
− | | 12.5
| |
− | |- class="odd"
| |
− | | CONVERT(25,"pt","qt")
| |
− | | 45
| |
− | | pt
| |
− | | qt
| |
− | | 22.5
| |
− |
| |
− | |}
| |
− |
| |
− | |+CORRELATION BY ROWS
| |
− | |-
| |
− | ! !! ROW1 !!ROW2
| |
− | |-
| |
− | | ROW1 || 1 || 0.9661943464912911
| |
− | |-
| |
− | |ROW2 || 0.9661943464912911 || 1
| |
− | |}
| |
− |
| |
− | {| id="TABLE3" class="SpreadSheet blue"
| |
| |- class="even" | | |- class="even" |
| !Equation | | !Equation |
Revision as of 17:09, 13 July 2018
CONVERT (Number,FromUnit,ToUnit,DoNotConvertUsingEquivalents,MatchAllOnLeft,MatchAllOnRight)
- is the value in to change.
- is the units for the value.
- is the units for the result.
- CONVERT(),Converts a number from one measurement system to another
Description
- This function converts one unit system to another unit system.
- Example:To change the length in kilometer unit to standard unit meter.
- and will accept any units which we need to give in " "(double quotes).
This function show the result as Error:
- when the input value are incorrect
- when the and does not exist
- when the units are in not same groups.
Unit names and indications are case-sensitive.
Weight/Mass
|
Fromunit or Tounit
|
Gram
|
"g"
|
Kilo gram
|
"kg"
|
Slug
|
"sg"
|
Pound mass
|
"lbm"
|
U(atomic mass unit)
|
"u"
|
Ounce mass
|
"ozm"
|
Distance
|
Fromunit or Tounit
|
Meter
|
"m"
|
Kilometer
|
"km"
|
Statute mile
|
"mi"
|
Nautical mile
|
"Nmi"
|
Inch
|
"in"
|
yard
|
"yd"
|
Foot
|
"ft"
|
Angstrom
|
"ang"
|
Pica(1/72 in.)
|
"Pica"
|
Time
|
Fromunit or Tounit
|
Year
|
"yr"
|
Day
|
"day"
|
Hour
|
"hr"
|
Minute
|
"mn"
|
Second
|
"sec"
|
Pressure
|
Fromunit or Tounit
|
Pascal
|
"Pa"
|
Atmosphere
|
"atm"
|
mm of Mercury
|
"mmHg"
|
Force
|
Fromunit or Tounit
|
Newton
|
"N"
|
Dyne
|
"dyn"
|
Pound Force
|
"lbf"
|
Energy
|
Fromunit or Tounit
|
Joule
|
"J"
|
Erg
|
"e"
|
IT calorie
|
"cal"
|
Thermodynamic calorie
|
"c"
|
BTU
|
"BTU"
|
Electron volt
|
"eV"
|
Foot pound
|
"flb"
|
Horsepower hour
|
"HPh"
|
Watt-hour
|
"Wh"
|
Kilocalorie
|
"kcal"
|
Power
|
Fromunit or Tounit
|
Horse power
|
"HP"
|
Watt
|
"W"
|
Magnetism
|
Fromunit or Tounit
|
Gauss
|
"ga"
|
Tesla
|
"T"
|
Temperature
|
Fromunit or Tounit
|
Kelvin
|
"K"
|
Degree Celsius
|
"C"
|
Degree Fahrenheit
|
"F"
|
Liquid Measure
|
Fromunit or Tounit
|
Liter
|
"l"
|
Milliliter
|
"ml"
|
Gallon
|
"gal"
|
Quart
|
"qt"
|
U.K.pint
|
"uk_pt"
|
U.S.pint
|
"pt"
|
Cup
|
"cup"
|
Fluid ounce
|
"oz"
|
Teaspoon
|
"tsp"
|
Tablespoon
|
"tbs"
|
For Example, =CONVERT(1.50, "lbm", "kg") is 0.6804
ZOS
- The syntax to CONVERT units in ZOS is
- is the value in to change.
- is the units for the value.
- is the units for the result.
- For e.g.,CONVERT(10.5..12.5..0.25,"in","ft")
Examples
Equation
|
Number
|
Fromunit
|
Tounit
|
Result
|
CONVERT(10,"ozm","sg")
|
10
|
ozm
|
sg
|
0.019425668878
|
CONVERT(30,"lbm","kg")
|
30
|
lbm
|
kg
|
13.60776929
|
CONVERT(0.5,"mi","m")
|
0.5
|
mi
|
m
|
804.6077
|
CONVERT(0.002,"km","Nmi")
|
0.002
|
km
|
Nmi
|
0.001079
|
CONVERT(5,"ft","in")
|
5
|
ft
|
in
|
60
|
CONVERT(7,"yd","ang")
|
7
|
yd
|
ang
|
64007999999.9
|
CONVERT(5,"yd","Pica")
|
5
|
yd
|
Pica
|
12959.99
|
CONVERT(15,"Pa","mmHg")
|
15
|
Pa
|
mmHg
|
0.112509
|
CONVERT(4, "yr","day")
|
4
|
yr
|
day
|
1461
|
CONVERT(1.5,"mn","sec")
|
1.5
|
mn
|
sec
|
90
|
CONVERT(15,"lbf","N")
|
15
|
lbf
|
N
|
66.72333
|
CONVERT(10,"BTU","J")
|
10
|
BTU
|
J
|
10550.581
|
CONVERT(15,"W","HP")
|
15
|
W
|
HP
|
0.020115301
|
CONVERT(45,"T","ga")
|
45
|
T
|
ga
|
450000
|
CONVERT(90,"degF","degK")
|
90
|
degF
|
degK
|
305.3722222
|
CONVERT(100,"oz","cup")
|
100
|
oz
|
cup
|
12.5
|
CONVERT(25,"pt","qt")
|
45
|
pt
|
qt
|
22.5
|
Related Videos
See also
References