From: | Rajesh Kumar Mallah <mallah(at)trade-india(dot)com> |
---|---|
To: | Tomasz Myrta <jasiek(at)klaster(dot)net>, 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-19 04:59:17 |
Message-ID: | 200303191029.17542.mallah@trade-india.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
the age function can also be used i guess.
where age(tstamp) < '20 mins'::interval
regds
mallah.
On Tuesday 18 Mar 2003 11:49 pm, Tomasz Myrta wrote:
> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)
Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.
From | Date | Subject | |
---|---|---|---|
Next Message | David Loh | 2003-03-19 05:43:48 | Casting with character and character varying |
Previous Message | David Witham | 2003-03-19 04:42:45 | Number of rows affected by an update |