Pitney Bowes MapInfo Professional User Manual
Page 249

The comparison operators are =, <>, <, >, <=, >= and should all work as expected for the Time and
DateTime values. For Time values, the smallest Time is "12:00:00.000 AM" while the largest Time is
"11:59:59.999 PM".
The "Between" operator works as expected for DateTime values. For Time values, we support wrap-around
comparisons. For example:
TimeValue Between "2:00 AM" And "10:00 PM" is true if the TimeValue is greater than or equal to "2:00
AM" and less than or equal to "10:00 PM"
TimeValue Between "10:00 PM" And "2:00 AM" is true if the TimeValue is greater than or equal to "10:00
PM" and less than or equal to "11:59:59.999" or greater than or equal to "12:00 AM" and less than or
equal to "2:00 AM"
Using Logical Operators with Time and Time/Date Data Types
A Time or DateTime field with a value is true, while the same field with a null value indicates false. The
behavior of the logical operators And, Or, and Not should follow logically from this.
Interpreting Excel Data
Using Excel you can format numeric cells as Dates and/or Times. Excel determines the meaning of the
'm' format code as either 'month' or 'minute' based on the rest of the format code.
Are treated as
Fields registered with
Date fields
Date format but not Time format
Time fields
Time format but not Date format
DateTime fields
Date format and Time format
The Date fields in older MapInfo Professional files are treated as Date fields until you re-register
them to use the DateTime data type.Older versions of MapInfo Professional supported Date
Note:
fields with the format 'y' (year), 'm' (month), or 'd' (day). Time fields within the format 'h' (hour) or
's' (second) were treated as Float fields. Fields with Date and Time format codes were treated
as a Date field and the Time information was ignored.
The Help System contains these related topics:
• Ensuring that Dates Display Correctly for Excel for Macintosh Tables
• Controlling how MapInfo Professional Handles Mixed Data Type Columns
Interpreting Microsoft Access Data
Access data uses a DateTime type, but not separate Date or Time types. MapInfo Professional registers
the Access DateTime type fields as DateTime fields.
The Date fields in older MapInfo Professional files are treated as Date fields until you re-register
them to use the DateTime data type.
Note:
When you save a MapInfo table to Access format, MapInfo Professional writes Date, Time, and DateTime
fields as Access DateTime fields. The .tab file itself maintains the Date, Time, and DateTime types so
when you reopen the file, the Date, Time, or DateTime data displays. If you attempt to open these .tab
files using a non-MapInfo application, these fields display as DateTime.
Interpreting dBase Data
The dBase format supports Date fields but does not explicitly support Time or DateTime fields. Therefore,
when you register an existing dBase file, there will be no Time or DateTime fields. When you save or
export a MapInfo table with Time or DateTime fields to a dBase file, Time and DateTime fields are written
out as character fields of length 9 and 17, respectively so that the data is written out in numeric formats.
249
MapInfo Professional User Guide
Chapter 9: Selecting and Querying Data