pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marin D <marin@cybernet.bg>
To: Bassel Hatoum <bassel@gnc.net>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Trouble with dates
Date: Sun, 31 May 1998 19:56:13 +0300 (EET DST)
Message-ID: <Pine.LNX.3.96.980531194807.18113B-100000@server.iclub.techno-link.com> (raw)
In-Reply-To: <35708815.6D4E3AF3@gnc.net>


CREATE TABLE test (d DATE);

INSERT INTO test VALUES (CURRENT_DATE);


test=> SELECT DATE( DATETIME(d) + '1 month'::TIMESPAN) FROM test;

      date
----------
30-06-1998
(1 row)

test=>


Hope this helps...

	Marin

          -= Why do we need gates in a world without fences? =-


On Sat, 30 May 1998, Bassel Hatoum wrote:

> I'm trying to add months to a date without having to calculate how many
> days in the month, etc.
> Oracle has an add_month function that would do the trick.  It there
> anything similar in PGSQL?  Or maybe a way to emulate it?
> 
> 




view thread (2+ messages)

Message-ID: <Pine.LNX.3.96.980531194807.18113B-100000@server.iclub.techno-link.com>
Permalink:  ../Pine.LNX.3.96.980531194807.18113B-100000@server.iclub.techno-link.com/
Also on:    postgresql.org/message-id/Pine.LNX.3.96.980531194807.18113B-100000@server.iclub.techno-link.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: marin@cybernet.bg, bassel@gnc.net
  Subject: Re: [SQL] Trouble with dates
  In-Reply-To: <Pine.LNX.3.96.980531194807.18113B-100000@server.iclub.techno-link.com>
  References: <35708815.6D4E3AF3@gnc.net> <Pine.LNX.3.96.980531194807.18113B-100000@server.iclub.techno-link.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