Subject RE: [firebird-support] Re:cast TIMESTAMP as integer
Author Alan McDonald
>
> 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.
>

But surely this will give the date only (when you cast).
What does the op want? the time? or the date?
Alan