﻿ Type Functions
Nevron Open Vision Documentation
Framework / Formulas / Functions / Type Functions
In This Topic
Type Functions
In This Topic

Syntax Description Example
EMPTY() Returns the empty variant value.

EMPTY()
Returns: the empty variant

ISARRAY(var) Returns true if the variant is array. Otherwise returns false.

ISARRAY(ARRAY(10,20))
Returns: true

ISARRAY(10)
Returns: false

ISBOOL(var) Returns true if the variant is a boolean. Otherwise returns false.

ISBOOL(true)
Returns: true

ISBOOL(false)
Returns: true

ISBOOL("true")
Returns: false

ISDATETIME(var) Returns true if the variant is a date time. Otherwise returns false.

ISDATETIME(10)
Returns: false

ISDATETIME(DATE(2008,9,28))
Returns: true

ISEMPTY(var) Returns true if the variant is empty. Otherwise returns false.

ISEMPTY(EMPTY())
Returns: true

ISEMPTY(true)
Returns: false

ISLENGTH(var) Returns true if the variant is a measure with unit from the length dimension.

ISLENGTH(10)
Returns: false

ISLENGTH(10[mm])
Returns: true

ISMASS(var) Returns true if the variant is a measure with unit from the mass dimension.

ISMASS(10)
Returns: false

ISMASS(10[kg])
Returns: true

ISMEASURE(var) Returns true if the variant is a measure of some kind.

ISMEASURE(10)
Returns: false

ISMEASURE(10[kg])
Returns: true

Returns: true

ISNUM(var) Returns true if the variant is a number. Otherwise returns false.

ISNUM(10)
Returns: true

ISNUM(true)
Returns: false

ISSTR(var) Returns true if the variant is a string. Otherwise returns false.

ISSTR(true)
Returns: false

ISSTR("hello world")
Returns: true

ISTIME(var) Returns true if the variant is a measure with unit from the time dimension.

ISTIME(10)
Returns: false

ISTIME(10[s])
Returns: true

TOBOOL(var) Safely converts a variant to a boolean variant. Returns EMPTY, if the conversion cannot be performed.

TOBOOL("false")
Returns: false

TOBOOL("true")
Returns: true

TOBOOL("hello")
Returns: the empty variant

TODATETIME(var[,sCulture]) Safely converts a variant to a data time variant. Returns EMPTY, if the conversion cannot be performed.
When strings a provided as argument they are by default parsed according to the current thread culture.
If culture is provided the string is parsed according to that culture.

DAY(TODATETIME("1/2/2008", "en-US"))
Returns: 2

DAY(TODATETIME("1/2/2008", "de-DE"))
Returns: 1

TONUM(var[,sCulture]) Safely converts a variant to a number variant. Returns EMPTY, if the conversion cannot be performed.
When strings a provided as argument they are by default parsed according to the current thread culture.
If culture is provided the string is parsed according to that culture.

TONUM(true)
Returns: 1

TONUM("10")
Returns: 10

TONUM("hello")
Returns: the empty variant

TOSTR(var[,sCulture]) Safely converts a variant to a string variant.
The to-string conversion is by default performed according to the current thread culture.
If culture is provided the conversion is performed according to that culture.

TOSTR(10.01, "en-US")
Returns: "10.01"

TOSTR(10.01, "de-DE")
Returns: "10,01"

TOSTR(DATE(2007,12,19), "en-US")
Returns: "12/19/2007 12:00:00 AM"

TOSTR(DATE(2007,12,19), "de-DE")
Returns: "19.12.2007 00:00:00"