Re: if else query help - Mailing list pgsql-sql

From John McKown
Subject Re: if else query help
Date
Msg-id Pine.LNX.4.21.0010121335580.11424-100000@linux2.johnmckown.net
Whole thread Raw
In response to Re: if else query help  (Jean-Christophe Boggio <cat@thefreecat.org>)
List 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



pgsql-sql by date:

Previous
From: Jie Liang
Date:
Subject: Re: Standard syntax?
Next
From: Peter Eisentraut
Date:
Subject: Re: Standard syntax?