Use the Expression dialog box to formulate mathematical and alphanumeric expressions in several MapInfo Pro dialog boxes.
When entering specific character strings, numbers, and dates into expressions, you need to observe the following conventions.
Character Strings in Expressions
When typing a particular string into an expression you must enclose it in double quotes. MapInfo Pro then treats it as a string rather than as a column name. For example, strings 1 and 2 shown below are valid string constants, while 3 and 4 are not.
- "Orange"
- "New York"
- Orange
- New York
Numbers in Expressions
When entering specific numerical values, do not use commas, dollar signs, or any characters other than numerals, decimal points, and the minus sign for negative numbers. You can use E to denote numbers in exponentiation.
Date Values in Expressions
Dates consist of a month, a day, and an optional year. The year is specified by two or four digits and enclosed in double quotes. The components of a date are separated by hyphens or slashes. If the year is not specified, it defaults to the year set on your computer's clock. The following are valid data constants:
System Order | What MapInfo Pro Expects |
---|---|
M/d/yy | 02/28/2005 |
M/d/yyyy | 02/28/2005 |
MM/dd/yy | 02/28/2005 |
MM/dd/yyyy | 02/28/2005 |
yy/MM/dd | 2005/02/28 |
dd-MMM-yy | 02-28-2005 |
Century Window in Expressions
MapInfo Pro includes a date window that converts two-digit input into four digit years. It also allows you to change the default to one that best suits your data. The default is to have date windowing turned off.