pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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 

view thread (5+ messages)  latest in thread

Message-ID: <EDF486306AE641B6975C838EB90DA7AC@ramasubramanian>
Permalink:  ../EDF486306AE641B6975C838EB90DA7AC@ramasubramanian/
Also on:    postgresql.org/message-id/EDF486306AE641B6975C838EB90DA7AC@ramasubramanian

 · 

reply

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