'TODAY'
Current date in cast context
CHAR(5), or depends on explicit CAST
'TODAY' is not a variable, but a string literal or date mnemonic.It is, however, special in the sense that when you CAST() it to a date/time type, you will get the current date.If the target datetime type has a time component, it will be set to zero.'TODAY' is case-insensitive, and the engine ignores leading or trailing spaces when casting.
|
Note
|
|
select 'Today' from rdb$database
-- returns 'Today'
select cast('Today' as date) from rdb$database
-- returns e.g. 2011-10-03
select cast('TODAY' as timestamp) from rdb$database
-- returns e.g. 2011-10-03 00:00:00.0000