From: ramasubramanian <ramasubramanian.g@renaissance-it.com>
To: Shruthi A <shruthi.iisc@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: How to get the previous date?
Date: Wed, 14 Oct 2009 15:30:52 +0530
Message-ID: <EDF486306AE641B6975C838EB90DA7AC@ramasubramanian> (raw)
References: <6caee9520910140240u13daba93ua20637642727776e@mail.gmail.com>
Helo Madam,
Here is the query.
select now()+ interval '-1 day '
Regards,
ram
----- Original Message -----
From: Shruthi A
To: pgsql-sql@postgresql.org
Sent: Wednesday, October 14, 2009 3:10 PM
Subject: [SQL] How to get the previous date?
Hi,
I'm using Enterprise DB PostgresPlus version 8.3.
Is there is a simple function or command like previous_date(mydate) which when passed a particular date, simply returns the previous date? I tried
mydate - 1
but this doesnt work.
Thanks,
Shruthi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ramasubramanian.g@renaissance-it.com, shruthi.iisc@gmail.com
Subject: Re: How to get the previous date?
In-Reply-To: <EDF486306AE641B6975C838EB90DA7AC@ramasubramanian>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox