Re: How to get the previous date?

From: "ramasubramanian" <ramasubramanian(dot)g(at)renaissance-it(dot)com>
To: "Shruthi A" <shruthi(dot)iisc(at)gmail(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: How to get the previous date?
Date: 2009-10-14 10:00:52
Message-ID: EDF486306AE641B6975C838EB90DA7AC@ramasubramanian
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Helo Madam,
Here is the query.
select now()+ interval '-1 day '
Regards,
ram
----- Original Message -----
From: Shruthi A
To: pgsql-sql(at)postgresql(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Oliveiros C, 2009-10-14 14:13:22 How to order varchar data by word
Previous Message Dmitriy Igrishin 2009-10-14 09:43:51 Re: How to get the previous date?