pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Terry Fielder <terry@ashtonwoodshomes.com>
To: Chandan_Kumaraiah <Chandan_Kumaraiah@satyam.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: query
Date: Thu, 17 Mar 2005 06:43:29 -0500
Message-ID: <42396D61.6070002@ashtonwoodshomes.com> (raw)
In-Reply-To: <2EB549AAAFEA264FA926269A5BD5E9EB146579@certsrv.satyam.com>
References: <2EB549AAAFEA264FA926269A5BD5E9EB146579@certsrv.satyam.com>

now() returns a timestamp.

Cast it to a date and then you can subtract days. e.g.

select now()::date -1

Terry

Chandan_Kumaraiah wrote:

>  
>
> *Hi,*
>
> * *
>
> *In oracle we write sysdate-1*
>
> *For example,we write a query (select * from table1 where 
> created_date>=sysdate-1).Whats its equivalent in postgre?*
>
> * *
>
> *Chandan*
>
> * *
>

-- 
Terry Fielder
terry@greatgulfhomes.com
Associate Director Software Development and Deployment
Great Gulf Homes / Ashton Woods Homes
Fax: (416) 441-9085

view thread (15+ messages)  latest in thread

Message-ID: <42396D61.6070002@ashtonwoodshomes.com>
Permalink:  ../42396D61.6070002@ashtonwoodshomes.com/
Also on:    postgresql.org/message-id/42396D61.6070002@ashtonwoodshomes.com

 · 

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: terry@ashtonwoodshomes.com, Chandan_Kumaraiah@satyam.com
  Subject: Re: query
  In-Reply-To: <42396D61.6070002@ashtonwoodshomes.com>

* 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