Re: interval is ignored

From: rodeored <info1(at)reenie(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: interval is ignored
Date: 2009-06-11 14:24:42
Message-ID: 16da042e-ff03-4856-bab0-fe2e33374427@h28g2000yqd.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Jun 11, 10:14 am, rodeored <in(dot)(dot)(dot)(at)reenie(dot)org> wrote:
> SELECT INTERVAL '1' MONTH = 00:00:00
>  Therefore now=onemonthago
> SELECT NOW(),NOW()- INTERVAL '1' MONTH as onemonthago
>
> How do I get the timestamp for one month ago?

Never mind,

its
SELECT NOW(),NOW()- INTERVAL '1 MONTH' as onemonthago

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2009-06-11 14:26:46 Re: help with data recovery from injected UPDATE
Previous Message Christophe 2009-06-11 14:22:46 Re: [GENERAL] "Rails and PostgreSQL" now up on media.postgresql.org