Re: showing records from the last 20 min

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: Matthew Nuzum <cobalt(at)bearfruit(dot)org>
Cc: Postgres SQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: showing records from the last 20 min
Date: 2003-03-18 18:19:50
Message-ID: 3E776346.4030306@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Użytkownik Matthew Nuzum napisał:
> I know this is such a simple question, but I can't find the answer in
> the manual and I've tried very hard to find it.
>
> I want to show all the records in a table that occurred in the last 20
> min.
>
> So, maybe something like:
> select * from sys_logins WHERE tstamp >= now() - '00:20';
>
> on pg 7.3.2 this produces the error:
> ERROR: Bad timestamp external representation '00:20'
>
> Thanks for any help,
Did you mean:
select * from sys_logins
WHERE tstamp >= now()-cast('20:00' as interval);
?

Regards,
Tomasz Myrta

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Matthew Nuzum 2003-03-18 18:36:30 Re: showing records from the last 20 min
Previous Message Matthew Nuzum 2003-03-18 18:00:56 showing records from the last 20 min