| Firebird Documentation Index → Firebird 2.0 Language Ref. Update → Context variables → CURRENT_TIMESTAMP |
![]() |
Available in: DSQL, PSQL, ESQL
Changed in: 2.0
Description: The fractional part of CURRENT_TIMESTAMP used to be always
“.0000”, giving an effective precision of 0 decimals. Now
you can specify a precision when polling this variable. The default is 3 decimals, i.e.
milliseconds precision.
Type: TIMESTAMP
Syntax:
CURRENT_TIMESTAMP [(precision)]precision::= 0 | 1 | 2 | 3The optional
precisionargument is not supported in ESQL.
Examples:
select current_timestamp from rdb$database -- returns e.g. 2008-08-13 14:20:19.6170select current_timestamp(2) from rdb$database -- returns e.g. 2008-08-13 14:20:23.1200
The default precision of CURRENT_TIME is still 0 decimals, so
CURRENT_TIMESTAMP is no longer the exact sum of
CURRENT_DATE and CURRENT_TIME, unless you explicitly
specify a precision.
| Firebird Documentation Index → Firebird 2.0 Language Ref. Update → Context variables → CURRENT_TIMESTAMP |