pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John McKown <joarmc@swbell.net>
To: Jean-Christophe Boggio <cat@thefreecat.org>
Cc: Brian C. Doyle <bcdoyle@mindspring.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: if else query help
Date: Thu, 12 Oct 2000 13:37:09 -0500 (CDT)
Message-ID: <Pine.LNX.4.21.0010121335580.11424-100000@linux2.johnmckown.net> (raw)
In-Reply-To: <6812102772.20001012165653@thefreecat.org>

On Thu, 12 Oct 2000, Jean-Christophe Boggio wrote:

<snip>
> portion of the day (although I don't know --yet-- how to convert
> date2-date1 to an integer, trunc does not work).


reltime(date2-date1)::int

Will subtract date1 from date2, then cast it to an integer.

John




view thread (5+ messages)

Message-ID: <Pine.LNX.4.21.0010121335580.11424-100000@linux2.johnmckown.net>
Permalink:  ../Pine.LNX.4.21.0010121335580.11424-100000@linux2.johnmckown.net/
Also on:    postgresql.org/message-id/Pine.LNX.4.21.0010121335580.11424-100000@linux2.johnmckown.net

 · 

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: joarmc@swbell.net, cat@thefreecat.org, bcdoyle@mindspring.com
  Subject: Re: if else query help
  In-Reply-To: <Pine.LNX.4.21.0010121335580.11424-100000@linux2.johnmckown.net>
  References: <6812102772.20001012165653@thefreecat.org> <Pine.LNX.4.21.0010121335580.11424-100000@linux2.johnmckown.net>

* 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