Subject | RE: [firebird-support] Re:cast TIMESTAMP as integer |
---|---|
Author | Alan McDonald |
Post date | 2009-11-25T19:55:34Z |
>But surely this will give the date only (when you cast).
> 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.
>
What does the op want? the time? or the date?
Alan