Subject | Re: Days since timestamp |
---|---|
Author | Adam |
Post date | 2006-05-26T01:08:31Z |
--- In firebird-support@yahoogroups.com, "Nigel Weeks" <nweeks@...>
wrote:
select
cast((cast('now' as TimeStamp) - dtm_stamp) as integer) as NumDays
from tbl_event
where .....
wrote:
>an event
> I'm pulling out my hair here...(what's left, anyway...)
>
> Table:
> CREATE TABLE tbl_event (
> int_event INTEGER NOT NULL,
> dtm_stamp TIMESTAMP,
> PRIMARY KEY(int_event)
> );
>
> How do I work out how many days(relative to 'now') it's been since
> happened?What on earth are you trying?
> I've got 7 levels of parenthesis and casts/extracts, and I'm getting
> grumpy!!!
>
select
cast((cast('now' as TimeStamp) - dtm_stamp) as integer) as NumDays
from tbl_event
where .....