Conversion Functions Reference

Click Functions Conversions in the Expression Elements Menu to view available conversion functions. They convert strings from one format to another. These functions are available for every data provider except for raster, WFS, and WMS providers.

The functions TODATE and TOSTRING support date formatting options.

Option Definition Syntax Example

TODATE

Converts a text string representing date/time information to a date. The returned value has a DateTime data type.

The text property provided must match the format provided. If it does not match, the conversion does not take place.

See Date Formatting Options.

TODATE(Text_property,format)

TODATE(Purchase_Date,MM/DD/YYYY)

In this example, the value for purchase date is converted to a date value with the format MM/DD/YYYY. If the purchase date value is November 2, 2002, it would convert to 11/02/2002.

TODOUBLE

Converts a numeric or text string to a double-precision, floating-point number.

TODOUBLE(Text_property)

TODOUBLE(Building_Value)

In this example, the Building_Value value is converted to a text string.

TOFLOAT

Converts a numeric or text string to a single-precision floating-point number.

TOFLOAT(Text_property)

TOFLOAT(Building_Value)

In this example, the Building_Value value is converted to a string.

TOINT32

Converts a numeric or string expression to an int32.

TOINT32(Text_property)

 

TOINT64

Converts a numeric or string expression to an int64.

TOINT64(Text_property)

 

TOSTRING

Converts a numeric or date expression to a string using an optional format you specify

or

Converts a numeric or Boolean property to a text string (no format can be assigned).

When you use ToString with a Boolean property, the operation generates 1/0 (not True/False) as a result.

See Date Formatting Options for format options.

TOSTRING(Date_property, format)

or

TOSTRING(Numeric_property)

TOSTRING(Building_Sale_Date,MM/DD/YYYY)

In this example, if the value for Building_Sale_Date is January 12, 2007, it is converted to the text string 01/12/2007.