ODBC and JDBC Guide

Table Of Contents
Chapter 7 | Supported standards 47
Constants
Constants are values that do not change. For example, in the expression PRICE * 1.05, the
value 1.05 is a constant. Or you might assign a value of 30 to the constant
Number_Of_Days_In_June.
You must enclose character constants in pairs of single quotation marks ('). To include a single
quotation mark in a character constant enclosed by single quotation marks, use two single
quotation marks together (for example, 'Don''t').
FileMaker accepts the ODBC/JDBC format date, time, and timestamp constants in braces ({}), for
example:
1 {D '2012-06-05'}
1 {T '14:35:10'}
1 {TS '2012-06-05 14:35:10'}
FileMaker allows the type specifier (D, T, TS) to be in upper case or lower case. You may use any
number of spaces after the type specifier, or even omit the space.
FileMaker also accepts SQL-92 syntax ISO date and time formats with no braces:
1 DATE 'YYYY-MM-DD'
1 TIME 'HH:MM:SS'
1 TIMESTAMP 'YYYY-MM-DD HH:MM:SS'
When entering date and time values, match the format of the database file locale. For example, if
the database was created on an Italian language system, use Italian date and time formats.
Constant Acceptable syntax (examples)
Text 'Paris'
Number 1.05
Date DATE '2012-06-05'
{ D '2012-06-05' }
{06/05/2012}
{06/05/12}
Note: The 2-digit year syntax is not supported for the ODBC/JDBC format or the SQL-92
format.
Time TIME '14:35:10'
{ T '14:35:10' }
{14:35:10}
Timestamp TIMESTAMP '2012-06-05 14:35:10'
{ TS '2012-06-05 14:35:10'}
{06/05/2012 14:35:10}
{06/05/12 14:35:10}
Make sure Strict data type: 4-Digit Year Date is not selected as a validation option in the
FileMaker database file for a field using this 2-digit year syntax.
Note: The 2-digit year syntax is not supported for the ODBC/JDBC format or the SQL-92
format.