Conversion Options

Conversion options are available from the Conversion menu. 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

NULVALUE

Evaluates two properties. If the first one is not null, NULLVALUE returns the value for that property. Otherwise, NULLVALUE returns the second property value.

NULLVALUE(Text_Property, Value)

NullValue(Parcel_Owner,'No Owner Listed')

In this example, NULLVALUE evaluates the value of Parcel_Owner. If it is null, it converts that null value to the string “no owner listed.” If there is a value for Parcel_Owner, it returns the owner value.

TODATE

Converts a text string representing date/time information to a date object. 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(Parcel_Value)

In this example, the Parcel_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(Parcel_Value)

In this example, the Parcel_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(Parcel_Sale_Date,MM/DD/YYYY)

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