<< TIME | IBExpert Glossary | TIME ZONE (Firebird 4.0) >>

TIMESTAMP is new to InterBase v 6.0. It is an SQL dialect 3 data type. TIMESTAMP is a 64-bit field type comprised of both date and time. The range is from January 1,100 AD to February 28, 32768 AD. It is the equivalent of DATE in SQL dialect 1.

It is possible to specify the display format of a date field under Environment Options / Grid / Display Formats. For the various options available, please refer to Date Time Format.

New to Firebird 2.0: CURRENT_TIMESTAMP now returns milliseconds by default

The context variable CURRENT_TIMESTAMP now returns milliseconds by default, while it truncated sub-seconds back to seconds in former versions. If you need to continue receiving the truncated value, you will now need to specify the required accuracy explicitly, i.e. specify CURRENT_TIMESTAMP(0).

Note: CURRENT_TIMESTAMP and 'NOW' are not exactly the same - CURRENT_TIMESTAMP represents the statement time and 'NOW' represents the current timestamp. For example, if you perform a long running update on a lot of records, you will see that using CURRENT_TIMESTAMP produces the same value for all records (the timestamp when the update statement was started); using 'NOW', you will see different values for each record, since the value is taken on a record level.

New to Firebird 4.0: Time zone support consists of TIME WITH TIME ZONE and TIMESTAMP WITH TIME ZONE data types, expressions and statements to work with time zones and conversion between data types without/with time zones. Please refer to TIME ZONE for details.

See also:
Table Editor
SQL Editor
Data types and subtypes
Selecting the right data type to improve database performance
Firebird 2.5 Language Reference Update
Firebird 2.1 Language Reference Update
Firebird 2.0 Language Reference Update
SQL Language Reference

back to top of page