Re: if else query help

From: John McKown <joarmc(at)swbell(dot)net>
To: Jean-Christophe Boggio <cat(at)thefreecat(dot)org>
Cc: "Brian C(dot) Doyle" <bcdoyle(at)mindspring(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: if else query help
Date: 2000-10-12 18:37:09
Message-ID: Pine.LNX.4.21.0010121335580.11424-100000@linux2.johnmckown.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2000-10-12 18:45:55 Re: Standard syntax?
Previous Message Jie Liang 2000-10-12 18:19:37 Re: Standard syntax?