Use the Expression dialog box to formulate mathematical and alphanumeric expressions in several MapInfo Pro 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.
Symbol | Description | Example | Detailed Example |
+ | plus | A + B | Date + Number: Date
04/01/2007 + 4: 04/05/2007 FloatNumber + Date: Date 4 + 232: 236 |
- | minus | A - B (subtraction) -A (negative) |
Date - Number: Date
Number - Date: Date 236 - 4: 232 some number - some number: Float |
* | times | A * B | some integer * some integer: Integer
some number * some number: Float |
/ | divided by | A / B | some number / some number: Float |
^ | exponentiation | A ^ B | some number ^ some number: Float |
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 Pro 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 Pro subtracts a date from a date, the result indicates a number of days.