Firebird Documentation Index → Firebird 2.0 Language Ref. Update → Miscellaneous language elements → Shorthand casts |
Find a more recent version at Firebird 5.0 Language Reference: Datetime Literals
Available in: DSQL, ESQL, PSQL
Added in: IB
Description: When converting a string literal to a DATE, TIME or TIMESTAMP, Firebird allows the use of a shorthand “C-style” cast. This feature already existed in InterBase 6, but was never properly documented.
Syntax:
datatype
'date/timestring
'
Examples:
update People set AgeCat = 'Old' where BirthDate < date '1-Jan-1943'
insert into Appointments (Employee_Id, Client_Id, App_date, App_time) values (973, 8804, date 'today' + 2, time '16:00')new.lastmod = timestamp 'now';
See also: CAST
Firebird Documentation Index → Firebird 2.0 Language Ref. Update → Miscellaneous language elements → Shorthand casts |