Version

UltraCalcFunctionConvert Class

Converts a value from one system of measurement to another. For example, meters to inches or hours to seconds.
Syntax
'Declaration
 
Public Class UltraCalcFunctionConvert 
   Inherits BuiltInFunctionBase
public class UltraCalcFunctionConvert : BuiltInFunctionBase 
Remarks

CONVERT(number, fromUnit, toUnit)
Number is the value to convert.
FromUnit is the unit in which the number is given.
ToUnit is the units to convert to.
Weight and mass units: "g" = gram "sg" = slug "lbm" = pound mass (avoirdupois) "u" = U (atomic mass unit) "ozm" = Ounce mass (avoirdupois)
Distance units: "m" = Meter "mi" = Statute mile "Nmi" = Nautical mile "in" = Inch "ft" = Foot "yd" = Yard "ang" = Angstrom "Pica" = Pica (1/72 in.)
Time units: "yr" = Year "day" = Day "hr" = Hour "mn" = Minute "sec" = Second
Pressure units "Pa" (or "p") = Pascal "atm" (or "at") = Atmosphere "mmHg" = mm of Mercury
Force units "N" = Newton "dyn" (or "dy") = Dyne "lbf" = Pound force
Energy units: "J" = Joule "e" = Erg "c" = Thermodynamic calorie "cal" = IT calorie "eV" (or "ev") = Electron volt "HPh" (or "hh") = Horsepower-hour "Wh" (or "wh") = Watt-hour "flb" = Foot-pound "BTU" (or "btu") = BTU
Power units: "HP" (or "h") = Horsepower "W" (or "w") = Watt
Magentism units: "T" = Tesla "ga" = Gauss
Temperature units: "C" (or "cel") = Degree Celsius "F" (or "fah") = Degree Fahrenheit "K" (or "kel") = Kelvin
Liquid measure units: "tsp" = Teaspoon "tbs" = Tablespoon "oz" = Fluid ounce "cup" = Cup "pt" (or "us_pt") = U.S. pint "uk_pt" = U.K. pint "qt" = Quart "gal" = Gallon "l" (or "lt") = Liter
Any metric ToUnit or FromUnit may be prefixed with one of the following: exa ("E") = 1E+18 peta ("P") = 1E+15 tera ("T") = 1E+12 giga ("G") = 1E+09 mega ("M") = 1E+06 kilo ("k") = 1E+03 hecto ("h") = 1E+02 dekao ("e") = 1E+01 deci ("d") = 1E-01 centi ("c") = 1E-02 milli ("m") = 1E-03 micro ("u") = 1E-06 nano ("n") = 1E-09 pico ("p") = 1E-12 femto ("f") = 1E-15 atto ("a") = 1E-18

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also