Difference between revisions of "Manuals/calci/CONVERT"

From ZCubes Wiki
Jump to navigation Jump to search
 
(48 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<div style="font-size:30px">'''CONVERT(n,fu,tu)'''</div><br/>
+
<div style="font-size:25px">'''CONVERT (Number,FromUnit,ToUnit,DoNotConvertUsingEquivalents,MatchAllOnLeft,MatchAllOnRight)'''</div><br/>
 +
*<math>Number</math> is the value in <math>Fromunit</math> to change.
 +
*<math>Fromunit</math> is the units for the value.
 +
*<math>Tounit</math>is the units for the result.
 +
**CONVERT(),Converts a number from one measurement system to another
  
*<math>n</math> is the value in <math>fu</math>.
+
==Description==
*<math>fu</math> is the units for the value.
+
*This function converts one unit system to another unit system.
*<math>tu</math>is the units for the result.  
+
*Example:To change the length in kilometer unit to standard unit meter.
 +
*<math>Fromunit</math> and <math>Tounit</math> 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 <math>Fromunit</math> and <math>Tounit</math> does not exist
 +
#when the units are in not same groups.
 +
 
 +
Unit names and indications are case-sensitive.
  
==Description==
 
This function gives the  changing the one unit system to other unit system.
 
Example:To change the length in kilometer unit to standard unit meter, Here N is the value to which we want to covert from FU to TU.  Also FU and TU will accept any units which we need to give in <math>" "</math>(double quotes).
 
  
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! Weight/Mass
 
! Weight/Mass
! Fu or Tu
+
! Fromunit or Tounit
  
 
|-
 
|-
Line 42: Line 50:
 
|-
 
|-
 
! Distance
 
! Distance
! Fu or Tu
+
! Fromunit or Tounit
  
 
|-
 
|-
Line 84: Line 92:
 
|-
 
|-
 
! Time
 
! Time
! Fu or Tu
+
! Fromunit or Tounit
  
 
|-
 
|-
Line 111: Line 119:
 
|-
 
|-
 
! Pressure
 
! Pressure
! Fu or Tu
+
! Fromunit or Tounit
  
 
|-
 
|-
Line 130: Line 138:
 
|-
 
|-
 
! Force
 
! Force
! Fu or Tu
+
! Fromunit or Tounit
  
 
|-
 
|-
Line 149: Line 157:
 
|-
 
|-
 
! Energy
 
! Energy
! Fu or Tu
+
! Fromunit or Tounit
  
 
|-
 
|-
Line 186: Line 194:
 
| Watt-hour  
 
| Watt-hour  
 
|  "Wh"
 
|  "Wh"
 +
 +
|-
 +
|Kilocalorie
 +
|"kcal"
 
|}
 
|}
  
Line 191: Line 203:
 
|-
 
|-
 
! Power
 
! Power
! Fu or Tu
+
! Fromunit or Tounit
  
 
|-
 
|-
Line 206: Line 218:
 
|-
 
|-
 
! Magnetism
 
! Magnetism
! Fu or Tu
+
! Fromunit or Tounit
  
 
|-
 
|-
Line 218: Line 230:
 
|}
 
|}
  
==Examples==
+
{| class="wikitable"
 +
|-
 +
! Temperature
 +
! Fromunit or Tounit
  
{| id="TABLE3" class="SpreadSheet blue"
+
|-
|- class="even"
+
| Kelvin
!Equation
+
| "K"
| n1
 
| n2
 
| n3
 
| SUM
 
|- class="odd"
 
|SUM(1,2,3)
 
| 1
 
| 2
 
| 3
 
| 6
 
|- class="even"
 
| SUM(5,-9,45)
 
| 5
 
| -9
 
| 45
 
| 41
 
|- class="odd"
 
| SUM(A1:A3)
 
| CELL A1                       
 
| CELL A2
 
| CELL A3
 
| A1+A2+A3
 
|- class="even"
 
  
|}
+
|-
 +
| Degree Celsius
 +
|  "C"
  
==See also==
+
|-
 +
| Degree  Fahrenheit
 +
|  "F"
  
*[[Manuals/calci/AVERAGE| AVERAGE]]
+
|}
*[[Manuals/calci/PRODUCT| PRODUCT]]
 
  
==References==
+
{| class="wikitable"
[http://en.wikipedia.org/wiki/Summation SUM]
+
|-
 +
! Liquid Measure
 +
! Fromunit or Tounit
  
 +
|-
 +
| Liter
 +
|  "l"
  
 +
|-
 +
| Milliliter
 +
| "ml"
  
CONVERT
+
|-
 +
| Gallon
 +
| "gal"
  
Where 'N' is the value in 'FU” to convert, 'FU' is the units for number and 'TU' is the units for the result.
+
|-
 +
| Quart
 +
| "qt"
  
 +
|-
 +
| U.K.pint
 +
| "uk_pt"
  
*CONVERT shows an error value when input data are incorrect.
+
|-
* Unit must be there in this function, otherwise it shows an error value.  
+
| U.S.pint
* Whenever the units are in different groups, CONVERT shows error value.
+
| "pt"
  
 +
|-
 +
| Cup
 +
| "cup"
  
CONVERT
+
|-
 +
| Fluid ounce
 +
| "oz"
  
 +
|-
 +
| Teaspoon
 +
| "tsp"
  
Lets see an example
+
|-
 +
| Tablespoon
 +
| "tbs"
 +
|}
  
CONVERT(N, FU,TU)
+
For Example, =CONVERT(1.50, "lbm", "kg") is 0.6804
  
 +
==ZOS==
 +
*The syntax to CONVERT units in ZOS is <math>CONVERT (Number,FromUnit,ToUnit,DoNotConvertUsingEquivalents,MatchAllOnLeft,MatchAllOnRight)</math>
 +
**<math>Number</math> is the value in <math>Fromunit</math> to change.
 +
**<math>Fromunit</math> is the units for the value.
 +
**<math>Tounit</math>is the units for the result.
 +
*For e.g.,CONVERT(10.5..12.5..0.25,"in","ft")
 +
{{#ev:youtube|lJ5-gEU4KSA|280|center|Unit Convertion}}
  
=CONVERT(1.50, "lbm", "kg") is 0.6804
+
==Examples==
 
+
{| class="wikitable"
=CONVERT(2.5, "ft", "sec") shows NAN(error) value.
+
|- class="even"
Syntax
+
!Equation
Remarks
+
! Number
Examples
+
! Fromunit
Description
+
! Tounit
'''This function converts a number from one measurement system to another system.'''
+
! Result
 
+
|- class="odd"
{| id="TABLE1" class="SpreadSheet blue"
+
|CONVERT(10,"ozm","sg")
 +
| 10
 +
| ozm
 +
| sg
 +
| 0.019425668878sg
 +
|- class="even"
 +
| CONVERT(30,"lbm","kg")
 +
| 30
 +
| lbm
 +
| kg
 +
| 13.60776929Kg
 +
|- class="odd"
 +
| CONVERT(0.5,"mi","m")
 +
| 0.5                       
 +
| mi
 +
| m
 +
| 804.6719999999999m
 +
|- class="even"
 +
| CONVERT(0.002,"km","Nmi")
 +
| 0.002
 +
| km
 +
| Nmi
 +
| 0.001079Nmi
 +
|- class="odd"
 +
| CONVERT(5,"ft","in")
 +
| 5
 +
| ft
 +
| in
 +
| 60in
 +
|- class="even"
 +
|  CONVERT(7,"yd","ang")
 +
| 7
 +
| yd
 +
| ang
 +
| 64007999999.9ang
 +
|- class="odd"
 +
| CONVERT(5,"yd","Pica")
 +
| 5
 +
| yd
 +
| Pica
 +
| 12959.99Pica
 
|- class="even"
 
|- class="even"
| class="   " |
+
| CONVERT(15,"Pa","mmHg")
<div id="1Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
+
| 15
| Column1
+
| Pa
| class="  " | Column2
+
| mmHg
| class="  " | Column3
+
| 0.112509mmHg
| class="  " | Column4
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
+
| CONVERT(4, "yr","day")
| class="sshl_f" | 0.6804
+
| 4
| class="sshl_f" | NaN
+
| yr
| class="sshl_f" |
+
| day
| class="sshl_f" |
+
|1461day
 
|- class="even"
 
|- class="even"
| class=" " | Row2
+
| CONVERT(1.5,"min","sec")
| class="sshl_f" |
+
| 1.5
| class="sshl_f SelectTD SelectTD" |
+
| min
<div id="1Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="1Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
+
| sec
| class="sshl_f" |
+
| 90sec
| class="sshl_f" |
 
 
|- class="odd"
 
|- class="odd"
| Row3
+
| CONVERT(15,"lbf","N")
| class="sshl_f" |
+
| 15
| class="sshl_f" |
+
| lbf
| class="sshl_f" |
+
| N
| class="sshl_f" |
+
|66.72333N
 
|- class="even"
 
|- class="even"
| Row4
+
| CONVERT(10,"BTU","J")
| class="sshl_f" |
+
| 10
| class="sshl_f" |
+
| BTU
| class="sshl_f" |
+
| J
| class="sshl_f" |
+
|10550.581J
 
|- class="odd"
 
|- class="odd"
| class=" " | Row5
+
| CONVERT(15,"W","HP")
| class="sshl_f" |
+
| 15
| class="sshl_f" |
+
| W
| class="sshl_f" |
+
| HP
| class="sshl_f" |
+
|0.020115301HP
 
|- class="even"
 
|- class="even"
| Row6
+
| CONVERT(45,"T","ga")
| class="sshl_f" |
+
| 45
| class="sshl_f" |
+
| T
| class="sshl_f" |
+
| ga
| class="sshl_f" |
+
| 450000ga
 +
|- class="odd"
 +
| CONVERT(90,"degF","degK")
 +
| 90
 +
| degF
 +
| degK
 +
| 305.3722222degK
 +
|- class="even"
 +
| CONVERT(100,"oz","cup")
 +
| 100
 +
| oz
 +
| cup
 +
| 12.5cup
 +
|- class="odd"
 +
| CONVERT(25,"pt","qt")
 +
| 45
 +
| pt
 +
| qt
 +
| 12.5qt
 +
 
 
|}
 
|}
 +
 +
==Related Videos==
 +
 +
{{#ev:youtube|YSWmgN-8w3o|280|center|CONVERT}}
 +
 +
==See also==
 +
 +
*[[Manuals/calci/BIN2DEC| BIN2DEC]]
 +
*[[Manuals/calci/BIN2HEX| BIN2HEX]]
 +
*[[Manuals/calci/BIN2OCT| BIN2OCT]]
 +
 +
==References==
 +
*[http://en.wikipedia.org/wiki/Conversion_of_units Convert Units]
 +
 +
 +
 +
 +
*[[Z_API_Functions | List of Main Z Functions]]
 +
 +
*[[ Z3 |  Z3 home ]]

Latest revision as of 02:55, 29 September 2021

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:

  1. when the input value are incorrect
  2. when the and does not exist
  3. 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")
Unit Convertion

Examples

Equation Number Fromunit Tounit Result
CONVERT(10,"ozm","sg") 10 ozm sg 0.019425668878sg
CONVERT(30,"lbm","kg") 30 lbm kg 13.60776929Kg
CONVERT(0.5,"mi","m") 0.5 mi m 804.6719999999999m
CONVERT(0.002,"km","Nmi") 0.002 km Nmi 0.001079Nmi
CONVERT(5,"ft","in") 5 ft in 60in
CONVERT(7,"yd","ang") 7 yd ang 64007999999.9ang
CONVERT(5,"yd","Pica") 5 yd Pica 12959.99Pica
CONVERT(15,"Pa","mmHg") 15 Pa mmHg 0.112509mmHg
CONVERT(4, "yr","day") 4 yr day 1461day
CONVERT(1.5,"min","sec") 1.5 min sec 90sec
CONVERT(15,"lbf","N") 15 lbf N 66.72333N
CONVERT(10,"BTU","J") 10 BTU J 10550.581J
CONVERT(15,"W","HP") 15 W HP 0.020115301HP
CONVERT(45,"T","ga") 45 T ga 450000ga
CONVERT(90,"degF","degK") 90 degF degK 305.3722222degK
CONVERT(100,"oz","cup") 100 oz cup 12.5cup
CONVERT(25,"pt","qt") 45 pt qt 12.5qt

Related Videos

CONVERT

See also

References