Simplicity in time/date functions

From: "Ben-Nes Michael" <miki(at)canaan(dot)co(dot)il>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Simplicity in time/date functions
Date: 2002-01-03 19:17:37
Message-ID: 03dc01c1948b$4e299ec0$aa0f5ac2@canaan.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All

I was amazed that:
select current_date() - 28 dont work at postgresql :(

I checked here and there and found that in postgresql i need to do something
like this:

select current_date::TIMESTAMP - '28 days'::INTERVAL as date

whow, is there a shorter way ?

--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--------------------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Darren Ferguson 2002-01-03 19:44:35 Re: Simplicity in time/date functions
Previous Message Gregory Wood 2002-01-03 18:22:40 Re: Filtering a bunch of records to one after a selection has returned a bunch of them