Using Date Literals
Go Up to Working with Dates and Times
InterBase supports the following date literals:
'TOMORROW'. Date literals are string values, entered between single quotation marks, that can be interpreted as date values for
'NOW' is a date literal that combines today’s date and time in InterBase format.
'TODAY' is today’s date with time information set to zero. Similarly,
'TOMORROW' are the expected dates with the time information set to zero.
'NOW' can be used in the search condition of a
WHERE clause to restrict the data retrieved:
EXEC SQL SELECT * FROM CROSS_RATE WHERE UPDATE_DATE = 'NOW';
'NOW' can be used to enter date and time values instead of relying on
isc calls to convert C dates to InterBase dates:
EXEC SQL INSERT INTO CROSS_RATE VALUES(:from, :to, :rate, 'NOW'); EXEC SQL UPDATE CROSS_RATE SET CONV_RATE = 1.75, SET UPDATE_DATE = 'TODAY' WHERE FROM_CURRENCY = 'POUND' AND TO_CURRENCT = 'DOLLAR' AND UPDATE_DATE < 'TODAY';