pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Haller <ch@rodos.fzk.de>
To: pgsql-sql@postgresql.org
Cc: mallah@trade-india.com
Subject: Re: Formatting intervals..
Date: Mon, 17 Mar 2003 15:09:28 +0100
Message-ID: <3E75D718.15DCFFA5@rodos.fzk.de> (raw)

>
> only last one question,
> how the truncate 9 mons 9 days to only month part ie
> 9 mons ?
>
select date_part('month',age ('10-10-1999'::timestamp ,
'1-1-1999'::timestamp ));
 date_part
-----------
         9
(1 row)

or

select extract (month from age ('10-10-1999'::timestamp ,
'1-1-1999'::timestamp ));
 date_part
-----------
         9
(1 row)

Regards, Christoph





view thread (15+ messages)  latest in thread

Message-ID: <3E75D718.15DCFFA5@rodos.fzk.de>
Permalink:  ../3E75D718.15DCFFA5@rodos.fzk.de/
Also on:    postgresql.org/message-id/3E75D718.15DCFFA5@rodos.fzk.de

 · 

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: ch@rodos.fzk.de, mallah@trade-india.com
  Subject: Re: Formatting intervals..
  In-Reply-To: <3E75D718.15DCFFA5@rodos.fzk.de>

* 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