Subject | Re:cast TIMESTAMP as integer |
---|---|
Author | svanderclock |
Post date | 2009-11-25T20:48:03Z |
no, it's work perfectly, and return me an integer :)
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@...> wrote:
>
> >
> > 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
>