Re: Dates in postgres

From: Anton de Wet <adw(at)obsidian(dot)co(dot)za>
To: Rob <rob(at)obsidian(dot)co(dot)za>
Cc: PostgreSQL Server <postgres(at)obsidian(dot)co(dot)za>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Dates in postgres
Date: 2002-02-25 16:00:14
Message-ID: Pine.LNX.4.33.0202251800070.19276-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, 25 Feb 2002, Rob wrote:

> I can get today's date in postgres using the current_date function, but I
> need to get the date one month ago from the current date. Is there any
> way to do this?

select now() - interval '1 month';

--

----------------------------------------------------------------------
"I really didn't foresee the Internet. But then, neither did the computer
industry. Not that that tells us very much of course - the computer industry
didn't even foresee that the century was going to end."
- Douglas Adams

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message David J. Lines 2002-02-25 16:38:30 Major newbie
Previous Message Pam Wampler 2002-02-25 15:27:08 Tried to upgrade from 7.1.3 to 7.2 --Fatal Error