Re: current_timestamp - 20 minutes

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Matthew Terenzio <matt(at)jobsforge(dot)com>
Cc: PgSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: current_timestamp - 20 minutes
Date: 2005-07-13 03:43:32
Message-ID: 42D48DE4.6030504@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Matthew Terenzio wrote:
>
>
> I 'm storing things in a table with now() and I want to select * from
> theTable WHERE the Timestamp is > the current time - 20 minutes
>
> Anyone know the correct syntax. I was trying something like:
>
> WHERE timestamp_field > (timestamp now() - interval '20 minutes')

select (now() - interval '20 min');

Sincerely,

Joshua D. Drake

>
> and will continue reading the manual
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match

--
Your PostgreSQL solutions provider, Command Prompt, Inc.
24x7 support - 1.800.492.2240, programming, and consulting
Home of PostgreSQL Replicator, plPHP, plPerlNG and pgPHPToolkit
http://www.commandprompt.com / http://www.postgresql.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Terenzio 2005-07-13 03:47:36 Re: current_timestamp - 20 minutes
Previous Message Matthew Terenzio 2005-07-13 03:30:23 current_timestamp - 20 minutes