Re: if else query help

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: sqllist <pgsql-sql(at)postgresql(dot)org>
Subject: Re: if else query help
Date: 2000-10-12 15:35:39
Message-ID: 39E5DA4B.DCE967D6@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Brian, Jean-Christophe,

>Someone corrects me if I'm wrong, I come from the Oracle world...
>
> Dates (or I should say TimeStamps) are stored as floating point values
> : the integer part is the number of days since a certain date
> (epoch or 01/01/1970 on unix-based databases) and the fractionnal part is the
> portion of the day (although I don't know --yet-- how to convert
> date2-date1 to an integer, trunc does not work).

You're doing this the hard way. One of Postgres' best features is its
rich collection of date-manipulation functions. Please see:

... Hmmmm. The online docs appear to be down. When they're back up,
please check the sections on: Date/Time data types, and Date/Time
manipulation functions.

-Josh Berkus

P.S. Brian, a general tutorial on writing SQL, such as O'Reilly's
soon-to-be released SQL book, might help you a great deal.

--
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 436-9166
for law firms, small businesses fax 436-0137
and non-profit organizations. pager 338-4078
San Francisco

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jie Liang 2000-10-12 17:36:20 Re: if else query help
Previous Message Jean-Christophe Boggio 2000-10-12 14:56:53 Re: if else query help