Skip to content

API Docs - v2.0.1

Unitconversion

Tested Siddhi Core version: 5.0.0

It could also support other Siddhi Core minor versions.

MmTokm (Function)

Function converts the input given in megameters into kilometers.

Syntax

<DOUBLE> unitconversion:MmTokm(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:MmTokm(1)

The megameter value 1 is converted into kilometers as 1000.0.

cmToft (Function)

Function converts the input given in centimeters to feet.

Syntax

<DOUBLE> unitconversion:cmToft(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:cmToft(100)

The centimeters value 100 will be converted into feet as 3.280.

cmToin (Function)

Function converts the input given in centimeters into inches.

Syntax

<DOUBLE> unitconversion:cmToin(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:cmToin(100)

Input centimeters value 100 will be converted into inches as 39.37.

cmTokm (Function)

Function converts the input value given in centimeters into kilometers.

Syntax

<DOUBLE> unitconversion:cmTokm(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:cmTokm(100)

The centimeters value 100 is converted into kilometers as 0.001.

cmTom (Function)

Function converts the input given in centimeters into meters.

Syntax

<DOUBLE> unitconversion:cmTom(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:cmTom(100)

The centimeters value 100 is converted into meters as 1.0.

cmTomi (Function)

Function converts the input given in centimeters into miles.

Syntax

<DOUBLE> unitconversion:cmTomi(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:cmTomi(10000)

The centimeters value 10000 is converted into miles as 0.062.

cmTomm (Function)

Function converts the input given in centimeters into millimeters.

Syntax

<DOUBLE> unitconversion:cmTomm(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:cmTomm(1)

The centimeter value 1 is converted into millimeters as 10.0.

cmTonm (Function)

Function converts the input given in centimeters into nanometers.

Syntax

<DOUBLE> unitconversion:cmTonm(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:cmTonm(1)

The centimeter value 1 is converted into nanometers as 10000000.

cmToum (Function)

Function converts the input in centimeters into micrometers.

Syntax

<DOUBLE> unitconversion:cmToum(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:cmToum(100)

The centimeters value 100 is converted into micrometers as 1000000.0.

cmToyd (Function)

Function converts the input given in centimeters into yards.

Syntax

<DOUBLE> unitconversion:cmToyd(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:cmToyd(1)

The centimeter value 1 is converted into yards as 0.01.

dToh (Function)

Function converts the input given in days into hours.

Syntax

<DOUBLE> unitconversion:dToh(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:dToh(1)

The day value 1 is converted into hours as 24.0.

gTokg (Function)

Function converts the input given in grams into kilograms.

Syntax

<DOUBLE> unitconversion:gTokg(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:gTokg(1000)

The grams value 1000 is converted into kilogram as 1.0.

gTomg (Function)

Function converts the input given in grams into milligrams.

Syntax

<DOUBLE> unitconversion:gTomg(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:gTomg(1)

The gram value 1 is converted into milligrams as 1000.0.

gToug (Function)

Function converts the input given in grams into micrograms.

Syntax

<DOUBLE> unitconversion:gToug(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:gToug(1)

The gram value 1 is converted into micrograms as 1000000.0.

hTom (Function)

Function converts the input given in hours into minutes.

Syntax

<DOUBLE> unitconversion:hTom(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:hTom(1)

The hour value 1 is converted into minutes as 60.0.

hTos (Function)

Function converts the input given in hours into seconds.

Syntax

<DOUBLE> unitconversion:hTos(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:hTos(1)

The hour value 1 is converted into seconds as 3600.0.

kgToLT (Function)

Function converts the input given in kilograms into imperial tons.

Syntax

<DOUBLE> unitconversion:kgToLT(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kgToLT(1000)

The kilograms value 1000 is converted into imperial tons as 0.9842.

kgToST (Function)

Function converts the input given in kilograms into US tons.

Syntax

<DOUBLE> unitconversion:kgToST(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kgToST(1000)

The kilograms value 1000 is converted into US tons as 1.10.

kgTog (Function)

Function converts the input given in kilograms into grams.

Syntax

<DOUBLE> unitconversion:kgTog(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kgTog(1)

The kilogram value 1 is converted into grams as 1000.

kgTolb (Function)

Function converts the input given in kilograms into pounds.

Syntax

<DOUBLE> unitconversion:kgTolb(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kgTolb(1)

The kilogram value 1 is converted into pounds as 2.2.

kgTooz (Function)

Function converts the input given in kilograms into ounces.

Syntax

<DOUBLE> unitconversion:kgTooz(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kgTooz(1)

The kilogram value 1 is converted into ounces as 35.274.

kgTost (Function)

Function converts the input given in kilograms into imperial stones.

Syntax

<DOUBLE> unitconversion:kgTost(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kgTost(1)

The kilogram value 1 is converted into imperial stones as 0.157.

kgTot (Function)

Function converts the input given in kilograms into tonnes.

Syntax

<DOUBLE> unitconversion:kgTot(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kgTot(1)

The kilogram value 1 is converted into tonnes as 0.001.

kmTocm (Function)

Function converts the input given in kilometers into centimeters.

Syntax

<DOUBLE> unitconversion:kmTocm(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kmTocm(1)

The kilometer value 1 is converted into centimeters as 100000.0.

kmToft (Function)

Function converts the input given in kilometers into foot.

Syntax

<DOUBLE> unitconversion:kmToft(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kmToft(1)

The kilometer value 1 is converted into foot as 3280.8.

kmToin (Function)

Function converts the input given in kilometers into inches.

Syntax

<DOUBLE> unitconversion:kmToin(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kmToin(1)

The kilometer value 1 is converted into inches as 39370.08.

kmTom (Function)

Function converts the input given in kilometers into meters.

Syntax

<DOUBLE> unitconversion:kmTom(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kmTom(1)

The kilometer value 1 is converted into meters as 1000.0.

kmTomi (Function)

Function converts the input given in kilometers into miles.

Syntax

<DOUBLE> unitconversion:kmTomi(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kmTomi(1)

The kilometer value 1 is converted into miles as 0.621.

kmTomm (Function)

Function converts the input given in kilometers into millimeters.

Syntax

<DOUBLE> unitconversion:kmTomm(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kmTomm(1)

The kilometer value 1 is converted into millimeters as 1000000.0.

kmTonm (Function)

Function converts the input given in kilometers into nanometers.

Syntax

<DOUBLE> unitconversion:kmTonm(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kmTonm(1)

The kilometer value 1 is converted into nanometers as 1000000000000.0.

kmToum (Function)

Function converts the input given in kilometers into micrometers.

Syntax

<DOUBLE> unitconversion:kmToum(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kmToum(1)

The kilometer value 1 is converted into micrometers as 1000000000.0.

kmToyd (Function)

Function converts the input given in kilometers into yards.

Syntax

<DOUBLE> unitconversion:kmToyd(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:kmToyd(1)

The kilometer value 1 is converted into yards as 1093.6.

lTom3 (Function)

Function converts the input given in liters into cubic meters.

Syntax

<DOUBLE> unitconversion:lTom3(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:lTom3(1000)

The liters value 1000 is converted into cubic meters as 1.

lToml (Function)

Function converts the input given in liters into milliliters.

Syntax

<DOUBLE> unitconversion:lToml(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:lToml(1)

The liter value 1 is converted into milliliters as 1000.0.

m3Tol (Function)

Function converts the input given in cubic meters into liters.

Syntax

<DOUBLE> unitconversion:m3Tol(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:m3Tol(1)

The cubic meter value 1 is converted into liters as 1000.0.

mTocm (Function)

Function converts the input given in meters into centimeters.

Syntax

<DOUBLE> unitconversion:mTocm(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:mTocm(1)

The meter value 1 is converted to centimeters as 100.0.

mToft (Function)

Function converts the input given in meters into foot.

Syntax

<DOUBLE> unitconversion:mToft(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:mToft(1)

The meter value 1 is converted into foot as 3.280.

mTomm (Function)

Function converts the input given in meters into millimeters.

Syntax

<DOUBLE> unitconversion:mTomm(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:mTomm(1)

The meter value 1 is converted into millimeters as 1000.0.

mTos (Function)

Function converts the input given in minutes into seconds.

Syntax

<DOUBLE> unitconversion:mTos(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:mTos(1)

The minute value 1 is converted into seconds as 60.0.

mToyd (Function)

Function converts the input given in meters into yards.

Syntax

<DOUBLE> unitconversion:mToyd(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:mToyd(1)

The meter value 1 is converted into yards as 1.093.

miTokm (Function)

Function converts the input given in miles into kilometers.

Syntax

<DOUBLE> unitconversion:miTokm(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:miTokm(1)

The mile value 1 is converted into kilometers as 1.6.

mlTol (Function)

Function converts the input given in milliliters into liters.

Syntax

<DOUBLE> unitconversion:mlTol(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:mlTol(1000)

The milliliters value 1000 is converted into liters as 1.

sToms (Function)

Function converts the input given in seconds into milliseconds.

Syntax

<DOUBLE> unitconversion:sToms(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:sToms(1)

The second value 1 is converted into milliseconds as 1000.0.

sTons (Function)

Function converts the input given in seconds into nanoseconds.

Syntax

<DOUBLE> unitconversion:sTons(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:sTons(1)

The second value 1 is converted into nanoseconds as 1000000000.0.

sTous (Function)

Function converts the input given in seconds into microseconds.

Syntax

<DOUBLE> unitconversion:sTous(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:sTous(1)

The second value 1 is converted into microseconds as 1000000.0.

tTog (Function)

Function converts the input given in tonnes into grams.

Syntax

<DOUBLE> unitconversion:tTog(<INT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:tTog(1)

The tonne value 1 is converted into grams as 1000000.0.

tTokg (Function)

Function converts the input given in tonnes into kilograms.

Syntax

<DOUBLE> unitconversion:tTokg(<INT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:tTokg(1)

The tonne value 1 is converted into kilograms as 1000.0.

yTod (Function)

Function converts the given input in years into days.

Syntax

<DOUBLE> unitconversion:yTod(<INT|LONG|FLOAT|DOUBLE> p1)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
p1 The value that needs to be converted. INT
LONG
FLOAT
DOUBLE
No Yes

Examples EXAMPLE 1

unitconversion:yTod(1)

The year value 1 is converted into days as 365.2525.