ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Numeric values functions / Math functions
  • Calculation on the angles
  • Calculation on the masses
  • Calculation on the temperatures
  • Calculation on the energy
  • Calculation on the force
  • Calculation on the length
  • Calculation on the speed
  • Calculation on the areas
  • Calculation on the volumes
  • Calculation on the consumption
  • Calculation on the pressures
  • Calculation on the power
  • Calculation on the magnetism
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Conversion (Function)
In french: Conversion
Converts a value from a unit to another one.
The possible conversions are:
  • converting angles
  • converting masses
  • converting temperature
  • converting energy
  • converting force
  • converting length
  • converting speed
  • converting surfaces (or areas)
  • converting volumes
  • converting consumption
  • converting pressure
  • converting power
  • converting magnetism
Example
// Convert degrees into seconds
Trace(Conversion(5, "degree", "second"))
Syntax
<Result> = Conversion(<Value to convert> , <Source Unit> , <Final unit>)
<Result>: Integer or real
Value in the final unit. A WLanguage error occurs if the <Source Unit> and the <Final Unit> do not belong to the same family of measures.
<Value to convert>: Integer, real or currency
Value to convert expressed in the source unit.
<Source Unit>: Character string
Source unit of the value to convert. The available units are described in the Notes.
<Final unit>: Character string
Unit into which the value must be converted. The available units are described in the Notes.
Remarks

Calculation on the angles

The available units are as follows:
Name in French / Name in EnglishAbbreviation
degré / degree°
minute / minute'
seconde / second","
grade / gradgon
radian / radianrad
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
degreeminutesecondgradradian
degreeXXXX
minuteX
secondX
gradX
radianX

Calculation on the masses

The available units are as follows:
Name in French / Name in EnglishAbbreviation
milligramme / milligrammg
gramme / gramg
kilogramme / kilogramkg
tonne / tont
grain / graingr
pennyweight / pennyweightdwt
livre / pound
livre / avoirdupois pound
lb
troy pound / troy pound
troy ounce / troy ounce
carat / carat
once / ounce
once / avoirdupois ounce
oz
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
Kilogramouncegrainpennyweighttroy ounce
milligramX
gramX
kilogramXX
tonX
grainX
pennyweightXX
poundXXX
troy poundXXX
troy ounceXX
caratX
ounceX

Calculation on the temperatures

The available units are as follows:
Name in French / Name in EnglishAbbreviation
kelvin / KelvinK
degré Fahrenheit / degree Fahrenheit°F
degré Celsius / degree Celsius°C
degré Rankine / degree Rankine°R
degré centigrade / degree centigrade
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
kelvindegree Fahrenheitdegree Celsiusdegree Rankinedegree centigrade
kelvinXXXXX
degree FahrenheitXX
degree CelsiusXX
degree RankineX
degree centigradeXX

Calculation on the energy

The available units are as follows:
Name in French / Name in EnglishAbbreviation
joule / jouleJ
calorie, calorieIT / calorie, calorieITCal, IT Cal
calorieth / caloriethTh Cal
electronvolt / electronvolteV
watt seconde / watt secondW.s
watt heure / watt hourW.h
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
joule
jouleX
calorieX
caloriethX
electronvoltX
watt secondX
watt hourX

Calculation on the force

The available units are as follows:
Name in French / Name in EnglishAbbreviation
newton / newtonN
dyne / dynedyn
kilogram-force / kilogram-forcekgf
kilopound / kilopoundkp
pound-force / pound-forcelbf
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
newton
newtonX
dyneX
kilogram-forceX
kilopoundX
pound-forceX

Calculation on the length

The available units are as follows:
Name in French / Name in EnglishAbbreviation
kilomètre / kilometerkm
mètre / meterm
décimètre / decimeterdm
centimètre / centimetercm
millimètre / millimetermm
ångström / ångström
unité astronomique / astronomical unitAU
chain / chainGunter's chain / Gunter's chainch
pied / footpied / UK footpied / international footft, UK ft
US foot / survey footUS foot / survey footUS ft
pied de roi / Paris footpie de roi / French measure foot
pouce / inchin
année lumière / light yearl.y.
mil / mil
mile / mileUK mile / UK milemi, UK mi
US mile / US mileUS mi
mille / French mile
mille nautique / nautical milenmi
pica écran / picapica écran / computer pica
pica imprimante / printer pica
point écran / pointpoint écran / computer point
point imprimante / printer point
rod / rod
yard / yardyd
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
meterUS footUS milepicapointfootrodinchmil
kilometerX
meterXXXX
decimeterX
centimeterX
millimeterX
ångströmX
astronomical unitX
chainGunter's chainXXXX
footXX
US footsurvey footX
Paris footX
inchXXXX
light yearX
milX
mileUK mileX
US mileXX
mileX
nautical mileX
computer picaXX
printer picaX
computer pointX
printer pointX
rodX
yardX

Calculation on the speed

The available units are as follows:
Name in French / Name in EnglishAbbreviation
kilomètre par heure / kilometer per hourkm/h
mètre par seconde / meter per secondm/s
noeud / knotnmi/h
mille par heure / mile per hourmi/h
mille par seconde / mile per secondmi/s
foot per minute / foot per minuteft/min
foot per second / foot per secondft/s
inch per second / inch per secondin/s
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
kilometer per hourmeter per secondnode
kilometer per hourX
meter per secondXXX
nodeX
mile per hourX
mile per secondX
foot per minuteX
foot per secondX
inch per secondX

Calculation on the areas

The available units are as follows:
Name in French / Name in EnglishAbbreviation
kilomètre carré / square kilometerkm2
mètre carré / square meterm2
décimètre carré / square decimeterdm2
centimètre carré / square centimetercm2
millimètre carré / square millimetermm2
acre / acre
are / are
barn / barnb
hectare / hectareha
square foot / square footsq ft, ft2
square inch / square inchsq in, in2
square mile / UK square milesquare mile / UK square milesq mi, UK sq mi, mi2
US square mile / US square mileUS sq mi
square yard / square yardsq yd, yd2
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
square meteracre
square kilometerX
square meterXX
square decimeterX
square centimeterX
square millimeterX
acreX
areX
barnX
hectareX
square footX
square inchX
square mile
UK square mile
XX
US square mileX
square yardX

Calculation on the volumes

The available units are as follows:
Name in French / Name in EnglishAbbreviation
kilomètre cube / cubic kilometerlm3
mètre cube / cubic meterm3
décimètre cube / cubic decimeterdm3
centimètre cube / cubic centimetercm3
millimètre cube / cubic millimetermm3
litre / literL
tonneau / barrelbbl
boisseau / bushel
cord / cord
pied cube / cubic feetft3
pouce cube / cubic inchin3
mille cube / cubic milemi3
cubic yard / cubic yardyd3
tasse / cup
gallon, UK gallon, Imperial gallon / gallon, UK gallon, Imperial gallongal, UK gal
US gallon / US gallonUS gal
gill, UK gill / gill, UK gillgi, UK gi
US gill / US gillUS gi
dry pint / dry pintdry pt
liquid pint / liquid pintliq pt
British imperial pint / pint
dry quart / dry quartdry qt
liquid quart / liquid quartliq qt
stere / sterest
cuillère à soupe / tablespoon
cuillère à café / teaspoon
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
cubic meterUS galloncubic foot
cubic kilometerX
cubic meterX
cubic decimeterX
cubic centimeterX
cubic millimeterX
literX
barrelX
bushelXX
cordXX
cubic footX
cubic inchX
cubic mileX
cubic yardX
cupX
gallon, UK gallon, Imperial gallonX
US gallonX
gill, UK gillX
US gillX
dry pintX
liquid pintX
pinteX
dry quartX
liquid quartX
stereX
tablespoonX
teaspoonX

Calculation on the consumption

The available units are as follows:
Name in French / Name in EnglishAbbreviation
litre au cent kilomètre / liter per 100 kilometerL/100 km
mile per gallon / mile per gallonmi/gal, mpg
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
liter per 100 kilometermile per gallon
liter per 100 kilometerXX
mile per gallonX

Calculation on the pressures

The available units are as follows:
Name in French / Name in EnglishAbbreviation
pascal / pascalPa
atmosphere / atmosphereatm
bar / bar
millibar / miilibarmbar
centimètre de mercure / centimeter of mercurycmHg
centimètre d'eau / centimeter of watercmH20
millimètre de mercure / millimeter of mercurymmHg
millimètre d'eau / millimeter of watermmH20
dyne per square centimeter / dyne per square centimeterdyn/cm2
pied de mercure / foot of mercuryftHg
pied d'eau / foot of waterftH20
pouce de mercure / inch of mercuryinHg
pouce d'eau / inch of waterinH20
pound-force per square inch / pound-force per square inchpsi, lbf/in2
torr / torr
kilogram-force per square centimeter / kilogram-force per square centimeterkgf/cm2
kilogram-force per square meter / kilogram-force per square meterkgf/m2
kilogram-force per square millimeter / kilogram-force per square millimeterkgf/mm2
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
pascalmillimeter of mercurymillimeter of water
pascalX
atmosphereX
barX
millibarX
centimeter of mercuryXX
centimeter of waterXX
millimeter of mercuryX
millimeter of waterX
dyne per square centimeterX
foot of mercuryX
foot of waterX
inch of mercuryX
inch of waterX
pound-force per square inchX
torrX
kilogram-force per square centimeterX
kilogram-force per square meterX
kilogram-force per square millimeterX

Calculation on the power

The available units are as follows:
Name in French / Name in EnglishAbbreviation
watt / wattW
cheval / horsepowerHP
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
watt
wattX
horsepowerX

Calculation on the magnetism

The available units are as follows:
Name in French / Name in EnglishAbbreviation
tesla / tesla
gauss / gaussGs
You have the ability to use the French name, the English name or the abbreviation.
The possible conversions are as follows:
Arrow
tesla
teslaX
gaussX
Business / UI classification: Neutral code
Component: wd290mat.dll
See also
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/21/2023

Send a report | Local help