pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Terry Fielder <terry@ashtonwoodshomes.com>
Cc: Chandan_Kumaraiah <Chandan_Kumaraiah@satyam.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: query
Date: Thu, 17 Mar 2005 12:02:14 +0000
Message-ID: <423971C6.1020706@archonet.com> (raw)
In-Reply-To: <42396D61.6070002@ashtonwoodshomes.com>
References: <2EB549AAAFEA264FA926269A5BD5E9EB146579@certsrv.satyam.com>
	<42396D61.6070002@ashtonwoodshomes.com>

Terry Fielder wrote:
> now() returns a timestamp.
> 
> Cast it to a date and then you can subtract days. e.g.
> 
> select now()::date -1

Or CURRENT_DATE - 1

>>
>> *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?*

--
   Richard Huxton
   Archonet Ltd



view thread (15+ messages)  latest in thread

Message-ID: <423971C6.1020706@archonet.com>
Permalink:  ../423971C6.1020706@archonet.com/
Also on:    postgresql.org/message-id/423971C6.1020706@archonet.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: dev@archonet.com, terry@ashtonwoodshomes.com, Chandan_Kumaraiah@satyam.com
  Subject: Re: query
  In-Reply-To: <423971C6.1020706@archonet.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