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'
).
For ODBC and JDBC applications, FileMaker software accepts the ODBC/JDBC format date, time, and timestamp constants in braces ({}).
{D '2028-06-05'}
{T '14:35:10'}
{TS '2028-06-05 14:35:10'}
FileMaker software 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 software also accepts SQL-92 syntax ISO date and time formats with no braces.
DATE 'YYYY-MM-DD'
TIME 'HH:MM:SS'
TIMESTAMP 'YYYY-MM-DD HH:MM:SS'
The FileMaker Pro ExecuteSQL function accepts only the SQL-92 syntax ISO date and time formats with no braces.
Constant |
Acceptable syntax (examples) |
Text |
Copy
|
Number |
Copy
|
Date |
Copy
Note The 2-digit year syntax is not supported for the ODBC/JDBC format or the SQL-92 format. |
Time |
Copy
|
Timestamp |
Copy
Make sure Strict data type: 4-Digit Year Date is not selected as a validation option in the FileMaker Pro 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. |
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.