9.20. 'YESTERDAY'
Available inDSQL, PSQL, ESQL
TypeCHAR(9)
Description'YESTERDAY'
is not a variable but a string literal.
It is, however, special in the sense that when you CAST()
it to a date/time type, you will get the date of the day before.
See also Section 9.17, “'TODAY'
”.
Examples
|
select 'Yesterday' from rdb$database
|-- returns 'Yesterday'
|
|select cast('Yesterday as date) from rdb$database
|-- returns e.g. 2011-10-02
|
|select cast('YESTERDAY' as timestamp) from rdb$database
|-- returns e.g. 2011-10-02 00:00:00.0000
Shorthand syntax for the last two statements:
|select date 'Yesterday' from rdb$database;
|select timestamp 'YESTERDAY' from rdb$database;