Subject | Re:cast TIMESTAMP as integer |
---|---|
Author | Paul R. Gardner |
Post date | 2009-11-25T13:58:35Z |
You can't cast directly, however you can do the following:
select cast(current_timestamp - cast('12/30/1899' as timestamp) as
integer)
from rdb$database
Subtracting 12/30/1899 will subtract 0 and not alter the date/time you
already have, however it will force the result to be returned as
numeric(18,9) which can then be cast as int.
[Non-text portions of this message have been removed]
select cast(current_timestamp - cast('12/30/1899' as timestamp) as
integer)
from rdb$database
Subtracting 12/30/1899 will subtract 0 and not alter the date/time you
already have, however it will force the result to be returned as
numeric(18,9) which can then be cast as int.
[Non-text portions of this message have been removed]