Entering Specific Values (Constants) into Expressions - MapInfo_Pro - 2023

MapInfo Pro Help

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapInfo Pro
Version
2023
ft:locale
en-US
Product name
MapInfo Pro
ft:title
MapInfo Pro Help
First publish date
1985
ft:lastEdition
2023-09-12
ft:lastPublication
2023-09-12T16:39:16.995000

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.

  1. "Orange"
  2. "New York"
  3. Orange
  4. 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.