Using mathematical operators in expressions, Using string operators in expressions – Pitney Bowes MapInfo Professional User Manual

Page 440

Advertising
background image

What MapInfo Professional Expects

System Order

02/28/2005

M/d/yy

02/28/2005

M/d/yyyy

02/28/2005

MM/dd/yy

02/28/2005

MM/dd/yyyy

2005/02/28

yy/MM/dd

02-28-2005

dd-MMM-yy

Using Mathematical Operators in Expressions

Use the Expression dialog box to formulate mathematical and alphanumeric expressions in several
MapInfo Professional dialog boxes. Mathematical operators are often used in creating expressions. The
following chart shows the operator's symbol, name, example, and how the operators handle different
data types.

Detailed Example

Example

Description

Symbol

Date + Number: Date

04/01/2007 + 4: 04/05/2007

A + B

plus

+

FloatNumber + Date: Date

4 + 232: 236

Date - Number: Date

Number - Date: Date

A - B (subtraction)

-A (negative)

minus

-

236 - 4: 232

some number - some number: Float

some integer * some integer: Integer

some number * some number: Float

A * B

times

*

some number / some number: Float

A / B

divided by

/

some number ^ some number: Float

A ^ B

exponentiation

^

The following calculations are possible:

• Adding numbers to dates to yield another date.

• Subtracting a number from a date to yield another date.

• Subtracting a date from a date to yield a number.

When you add numbers to dates or subtract numbers from dates, MapInfo Professional treats the numbers
as specifying a number of days. When you add or subtract a week, you use the number 7.

When you add or subtract a month, you use 30 or 31. When MapInfo Professional subtracts a date from
a date, the result indicates a number of days.

Using String Operators in Expressions

"concatenation" - connects strings and string expressions.

+

MapInfo Professional 12.5

440

Creating Expressions

Advertising