Documentation/Calc Functions/CONVERT

From The Document Foundation Wiki
Jump to: navigation, search


Im-jabber.svg

Under construction.
For now, see the system Help files.


Function name:

CONVERT

Category:

Add-in

Summary:

Converts a value from one unit of measure to the corresponding value in another unit of measure.

Syntax:

CONVERT(Number; "FromUnit"; "ToUnit")

Returns:

Arguments:

Number is the number to be converted.

FromUnit is the unit from which conversion is taking place.

ToUnit is the unit to which conversion is taking place. Both units must be of the same type.

Enter the units of measures directly as text in quotation marks or as a reference. If you enter the units of measure in cells, they must correspond exactly with the following list which is case sensitive: For example, in order to enter a lower case l (for liter) in a cell, enter the apostrophe ' immediately followed by l.

Property Units
Weight g, sg, lbm, u, ozm, stone, ton, grain, pweight, hweight, shweight, brton
Length m, mi, Nmi, in, ft, yd, ang, Pica, ell, parsec, lightyear, survey_mi
Time yr, day, hr, mn, sec, s
Pressure Pa, atm, at, mmHg, Torr, psi
Force N, dyn, dy, lbf, pond
Energy J, e, c, cal, eV, ev, HPh, Wh, wh, flb, BTU, btu
Power W, w, HP, PS
Field strength T, ga
Temperature C, F, K, kel, Reau, Rank
Volume l, L, lt, tsp, tbs, oz, cup, pt, us_pt, qt, gal, m3, mi3, Nmi3, in3, ft3, yd3, ang3, Pica3, barrel, bushel, regton, Schooner, Middy, Glass
Area m2, mi2, Nmi2, in2, ft2, yd2, ang2, Pica2, Morgen, ar, acre, ha
Speed m/s, m/sec, m/h, mph, kn, admkn
Information bit, byte

Units of measure in bold can be preceded by a prefix character from the following list:

Prefix Multiplier
Y (yotta) 10^24
Z (zetta) 10^21
E (exa) 10^18
P (peta) 10^15
T (tera) 10^12
G (giga) 10^9
M (mega) 10^6
k (kilo) 10^3
h (hecto) 10^2
e (deca) 10^1
d (deci) 10^-1
c (centi) 10^-2
m (milli) 10^-3
u (micro) 10^-6
n (nano) 10^-9
p (pico) 10^-12
f (femto) 10^-15
a (atto) 10^-18
z (zepto) 10^-21
y (yocto) 10^-24

Information units "bit" and "byte" may also be prefixed by one of the following IEC 60027-2 / IEEE 1541 prefixes:

ki kibi 1024

Mi mebi 1048576

Gi gibi 1073741824

Ti tebi 1099511627776

Pi pebi 1125899906842620

Ei exbi 1152921504606850000

Zi zebi 1180591620717410000000

Yi yobi 1208925819614630000000000

Additional details:

Examples:

=CONVERT(10;"HP";"PS") returns, rounded to two decimal places, 10.14. 10 HP equal 10.14 PS.

=CONVERT(10;"km";"mi") returns, rounded to two decimal places, 6.21. 10 kilometers equal 6.21 miles. The k is the permitted prefix character for the factor 10^3.

Related LibreOffice functions:

ODF standard:

Equivalent Excel functions: