Difference between revisions of "Manuals/calci/CONVERT"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> <font color="#000000"><font face="Arial, sans-serif"><font size="2">'''  '''</font></font></font> <font color="#4...")
 
 
(60 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left">
+
<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
  
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''  '''</font></font></font>
+
==Description==
 +
*This function converts one unit system to another unit system.
 +
*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.
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">CONVERT</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">(</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">N</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">, </font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">FU</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">TU</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">)</font></font></font>
+
Unit names and indications are case-sensitive.
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Where 'N' is the value in 'FU” to convert, 'FU' is the units for number and 'TU' is the units for the result. </font></font></font>
 
  
<br /><br />
+
{| class="wikitable"
 +
|-
 +
! Weight/Mass
 +
! Fromunit or Tounit
  
: {| width="100%" border="1" cellpadding="4"
+
|-
|- valign="top"
+
| Gram
! width="49%" |
+
| "g"
Weight and Mass
+
 
! width="51%" |
+
|-
FU or TU
+
| Kilo gram
|- valign="top"
+
| "kg"
| width="49%" |
+
 
Ounce mass
+
|-
| width="51%" |
+
| Slug
“ozm”
+
| "sg"
|- valign="top"
+
 
| width="49%" |
+
|-
<font face="Arial, sans-serif"><font size="2">Pound mass</font></font>
+
| Pound mass
| width="51%" |
+
| "lbm"
“ibm”
+
 
|- valign="top"
+
|-
| width="49%" |
+
| U(atomic mass unit)
Slug
+
| "u"
| width="51%" |
+
 
“<font face="Arial, sans-serif"><font size="2">sg” </font></font>
+
|-
|- valign="top"
+
| Ounce mass
| width="49%" |
+
| "ozm"
U
 
| width="51%" |
 
“u”
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Gram</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">g”</font></font>
 
 
|}
 
|}
  
<br /><br />
+
{| class="wikitable"
 +
|-
 +
! Distance
 +
! Fromunit or Tounit
 +
 
 +
|-
 +
| Meter
 +
|  "m"
 +
 
 +
|-
 +
| Kilometer
 +
| "km"
 +
 
 +
|-
 +
| Statute mile
 +
| "mi"
 +
 
 +
|-
 +
| Nautical mile
 +
| "Nmi"
 +
 
 +
|-
 +
| Inch
 +
| "in"
  
: {| width="100%" border="1" cellpadding="4"
+
|-
|- valign="top"
+
| yard
! width="48%" |
+
| "yd"
<font face="Arial, sans-serif"><font size="2">Distance</font></font>
+
 
! width="52%" |
+
|-
<font face="Arial, sans-serif"><font size="2">FU or TU</font></font>
+
| Foot
|- valign="top"
+
| "ft"
| width="48%" |
+
 
<font face="Arial, sans-serif"><font size="2">Inch</font></font>
+
|-
| width="52%" |
+
| Angstrom
“<font face="Arial, sans-serif"><font size="2">in”</font></font>
+
| "ang"
|- valign="top"
+
 
| width="48%" |
+
|-
<font face="Arial, sans-serif"><font size="2">Statute mile</font></font>
+
| Pica(1/72 in.)
| width="52%" |
+
| "Pica"
“<font face="Arial, sans-serif"><font size="2">mi”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Nautical mile</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">nmi”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Yard</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">yd”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Pica(1/72 in.)</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">pica”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Meter</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">m”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Angstrom</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">ang”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Foot</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">ft”</font></font>
 
 
|}
 
|}
  
<br /><br />
+
{| class="wikitable"
 +
|-
 +
! Time
 +
! Fromunit or Tounit
 +
 
 +
|-
 +
| Year
 +
| "yr"
 +
 
 +
|-
 +
| Day
 +
| "day"
 +
 
 +
|-
 +
| Hour
 +
|  "hr"
  
<br /><br />
+
|-
 +
| Minute
 +
| "mn"
  
<br /><br />
+
|-
 +
| Second
 +
| "sec"
  
: {| width="100%" border="1" cellpadding="4"
 
|- valign="top"
 
! width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Time</font></font>
 
! width="51%" |
 
<font face="Arial, sans-serif"><font size="2">FU or TU</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Second</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">sec”</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Minute</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">mn”</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Hour</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">hr”</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Day</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">day”</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Year</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">yr”</font></font>
 
 
|}
 
|}
  
<br /><br />
+
{| class="wikitable"
 +
|-
 +
! Pressure
 +
! Fromunit or Tounit
 +
 
 +
|-
 +
| Pascal
 +
| "Pa"
 +
 
 +
|-
 +
| Atmosphere
 +
| "atm"
 +
 
 +
|-
 +
| mm of Mercury
 +
| "mmHg"
  
: {| width="100%" border="1" cellpadding="4"
 
|- valign="top"
 
! width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Pressure</font></font>
 
! width="51%" |
 
<font face="Arial, sans-serif"><font size="2">FU or TU</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">mm of Mercury</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">mmhg”</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Pascal</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">pa” (or “p”)</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Atmosphere</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">atm” (or “at”)</font></font>
 
 
|}
 
|}
  
<br /><br />
+
{| class="wikitable"
 +
|-
 +
! Force
 +
! Fromunit or Tounit
 +
 
 +
|-
 +
| Newton
 +
| "N"
 +
 
 +
|-
 +
| Dyne
 +
| "dyn"
 +
 
 +
|-
 +
| Pound Force
 +
|  "lbf"
  
: {| width="100%" border="1" cellpadding="4"
 
|- valign="top"
 
! width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Force</font></font>
 
! width="51%" |
 
<font face="Arial, sans-serif"><font size="2">FU or TU</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Pound force</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">lbf”</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Dyne</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">dyn” (or “dy”)</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Newton</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">N”</font></font>
 
 
|}
 
|}
  
<br />
+
{| class="wikitable"
 +
|-
 +
! Energy
 +
! Fromunit or Tounit
 +
 
 +
|-
 +
| Joule
 +
|  "J"
 +
 
 +
|-
 +
| Erg
 +
| "e"
  
<br />
+
|-
 +
| IT calorie 
 +
| "cal"
  
: {| width="100%" border="1" cellpadding="4"
+
|-
|- valign="top"
+
| Thermodynamic calorie
! width="49%" |
+
| "c"
<font face="Arial, sans-serif"><font size="2">Energy</font></font>
+
 
! width="51%" |
+
|-
<font face="Arial, sans-serif"><font size="2">FU or TU</font></font>
+
| BTU
|- valign="top"
+
| "BTU"
| width="49%" |
+
 
<font face="Arial, sans-serif"><font size="2">IT calorie</font></font>
+
|-
| width="51%" |
+
| Electron volt
“<font face="Arial, sans-serif"><font size="2">cal”</font></font>
+
| "eV"
|- valign="top"
+
 
| width="49%" |
+
|-
<font face="Arial, sans-serif"><font size="2">Erg</font></font>
+
| Foot pound
| width="51%" |
+
| "flb"
“<font face="Arial, sans-serif"><font size="2">e”</font></font>
+
 
|- valign="top"
+
|-
| width="49%" |
+
| Horsepower hour  
<font face="Arial, sans-serif"><font size="2">Thermodynamic calorie</font></font>
+
| "HPh"
| width="51%" |
+
 
“<font face="Arial, sans-serif"><font size="2">c”</font></font>
+
|-
|- valign="top"
+
| Watt-hour  
| width="49%" |
+
| "Wh"
<font face="Arial, sans-serif"><font size="2">Joule</font></font>
+
 
| width="51%" |
+
|-
“<font face="Arial, sans-serif"><font size="2">J”</font></font>
+
|Kilocalorie
|- valign="top"
+
|"kcal"
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">BTU</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">BTU” (or “btu”)</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Electron volt</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">eV” (or “ev”)</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Foot-pound</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">fib”</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Horsepower-hour</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">HPH” (or “hh”)</font></font>
 
|- valign="top"
 
| width="49%" |
 
<font face="Arial, sans-serif"><font size="2">Watt-hour</font></font>
 
| width="51%" |
 
“<font face="Arial, sans-serif"><font size="2">WH”(or “wh”)</font></font>
 
 
|}
 
|}
  
<br />
+
{| class="wikitable"
 +
|-
 +
! Power
 +
! Fromunit or Tounit
 +
 
 +
|-
 +
| Horse power
 +
| "HP"
  
<br />
+
|-
 +
| Watt
 +
| "W"
  
: {| width="100%" border="1" cellpadding="4"
 
|- valign="top"
 
! width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Power</font></font>
 
! width="52%" |
 
<font face="Arial, sans-serif"><font size="2">FU or TU</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Horsepower</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">HP” (or “h”)</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Watt</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">W” (or “w”)</font></font>
 
 
|}
 
|}
  
<br />
+
{| class="wikitable"
 +
|-
 +
! Magnetism
 +
! Fromunit or Tounit
  
<br />
+
|-
 +
| Gauss
 +
| "ga"
  
<br />
+
|-
 +
| Tesla
 +
| "T"
  
: {| width="100%" border="1" cellpadding="4"
 
|- valign="top"
 
! width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Magnetism</font></font>
 
! width="52%" |
 
<font face="Arial, sans-serif"><font size="2">FU or TU</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Gauss</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">ga”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Tesla</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">T”</font></font>
 
 
|}
 
|}
  
<br />
+
{| class="wikitable"
 +
|-
 +
! Temperature
 +
! Fromunit or Tounit
  
: {| width="100%" border="1" cellpadding="4"
+
|-
|- valign="top"
+
| Kelvin
! width="48%" |
+
| "K"
<font face="Arial, sans-serif"><font size="2">Temperature</font></font>
 
! width="52%" |
 
<font face="Arial, sans-serif"><font size="2">FU or TU</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Kelvin</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">K” (or “kel”)</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Degree Celsius</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">C” (or “cel”)</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Degree Fahrenheit</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">F” (or “fah”)</font></font>
 
|}
 
  
<br />
+
|-
 +
| Degree Celsius
 +
|  "C"
  
<br />
+
|-
 +
| Degree  Fahrenheit
 +
|  "F"
  
: {| width="100%" border="1" cellpadding="4"
 
|- valign="top"
 
! width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Liquid measure</font></font>
 
! width="52%" |
 
<font face="Arial, sans-serif"><font size="2">FU or TU</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Liter</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">l” (or “lt”)</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Galon</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">gal”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Quart</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">qt”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">U.K. pint</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">uk_pt”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">U.S. pint</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">pt” (or “us_pt”)</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Cup</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">cup”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Fluid ounce</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">oz”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Tablespoon</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">tbs”</font></font>
 
|- valign="top"
 
| width="48%" |
 
<font face="Arial, sans-serif"><font size="2">Teaspoon</font></font>
 
| width="52%" |
 
“<font face="Arial, sans-serif"><font size="2">tsp”</font></font>
 
 
|}
 
|}
  
<br />
+
{| class="wikitable"
 +
|-
 +
! Liquid Measure
 +
! Fromunit or Tounit
  
</div>
+
|-
----
+
| Liter
<div id="7SpaceContent" class="zcontent" align="left"
+
"l"
  
* <font color="#484848"><font face="Arial, sans-serif"><font size="2">CONVERT shows an error value when input data are incorrect.</font></font></font>
+
|-
* <font color="#484848"><font face="Arial, sans-serif"><font size="2">Unit must be there in this function, otherwise it shows an error value. </font></font></font>
+
| Milliliter
* <font color="#484848"><font face="Arial, sans-serif"><font size="2">Whenever the units are in different groups, CONVERT shows error value. </font></font></font>
+
| "ml"
  
</div>
+
|-
----
+
| Gallon
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
+
| "gal"
  
CONVERT
+
|-
 +
| Quart
 +
| "qt"
  
</div></div>
+
|-
----
+
| U.K.pint
<div id="8SpaceContent" class="zcontent" align="left">
+
| "uk_pt"
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Lets see an example,</font></font></font>
+
|-
 +
| U.S.pint
 +
| "pt"
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">CONVERT(N, FU,TU)</font></font></font>
+
|-
 +
| Cup
 +
| "cup"
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2"><nowiki>=CONVERT(1.50, "lbm", "kg") is 0.6804</nowiki></font></font></font>
+
|-
 +
| Fluid ounce
 +
| "oz"
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2"><nowiki>=CONVERT(2.5, "ft", "sec") shows NAN(error) value.</nowiki></font></font></font>
+
|-
 +
| Teaspoon
 +
| "tsp"
  
</div>
+
|-
----
+
| Tablespoon
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
+
| "tbs"
----
+
|}
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
<div id="5SpaceContent" class="zcontent" align="left">
 
  
<font color="#000000"><font face="Arial, sans-serif"><font size="2">  </font></font></font>
+
For Example, =CONVERT(1.50, "lbm", "kg") is 0.6804
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">'''This function converts a number from one measurement system to another system.'''</font></font></font>
+
==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}}
  
</div>
+
==Examples==
----
+
{| class="wikitable"
<div id="1SpaceContent" class="zcontent" align="left">
+
|- class="even"
 
+
!Equation
{| id="TABLE1" class="SpreadSheet blue"
+
! Number
 +
! Fromunit
 +
! Tounit
 +
! Result
 +
|- class="odd"
 +
|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"
 +
| CONVERT(15,"Pa","mmHg")
 +
| 15
 +
| Pa
 +
| mmHg
 +
| 0.112509mmHg
 +
|- class="odd"
 +
| CONVERT(4, "yr","day")
 +
| 4
 +
| yr
 +
| day
 +
|1461day
 
|- class="even"
 
|- class="even"
| class="  " |
+
| CONVERT(1.5,"min","sec")
<div id="1Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
+
| 1.5
| Column1
+
| min
| class="  " | Column2
+
| sec
| class="  " | Column3
+
| 90sec
| class="  " | Column4
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
+
| CONVERT(15,"lbf","N")
| class="sshl_f" | 0.6804
+
| 15
| class="sshl_f" | NaN
+
| lbf
| class="sshl_f" |
+
| N
| class="sshl_f" |
+
|66.72333N
 
|- class="even"
 
|- class="even"
| class=" " | Row2
+
| CONVERT(10,"BTU","J")
| class="sshl_f" |
+
| 10
| class="sshl_f SelectTD SelectTD" |
+
| BTU
<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>
+
| J
| class="sshl_f" |
+
|10550.581J
| class="sshl_f" |
 
 
|- class="odd"
 
|- class="odd"
| Row3
+
| 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"
| Row4
+
| CONVERT(45,"T","ga")
| class="sshl_f" |
+
| 45
| class="sshl_f" |
+
| T
| class="sshl_f" |
+
| ga
| class="sshl_f" |
+
| 450000ga
 
|- class="odd"
 
|- class="odd"
| class=" " | Row5
+
| CONVERT(90,"degF","degK")
| class="sshl_f" |
+
| 90
| class="sshl_f" |
+
| degF
| class="sshl_f" |
+
| degK
| class="sshl_f" |
+
| 305.3722222degK
 
|- class="even"
 
|- class="even"
| Row6
+
| CONVERT(100,"oz","cup")
| class="sshl_f" |
+
| 100
| class="sshl_f" |
+
| oz
| class="sshl_f" |
+
| cup
| class="sshl_f" |
+
| 12.5cup
 +
|- class="odd"
 +
| CONVERT(25,"pt","qt")
 +
| 45
 +
| pt
 +
| qt
 +
| 12.5qt
 +
 
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
==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 03: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