Re: Interval examples - Mailing list pgsql-general

From Andrew McMillan
Subject Re: Interval examples
Date
Msg-id 399A8920.97B94B96@catalyst.net.nz
Whole thread Raw
In response to Interval examples  (George Robinson II <george.robinson@eurekabroadband.com>)
List pgsql-general
George Robinson II wrote:
>
>         Could someone please send me some examples of the interval data type?
> For example, what should the data look like in order to do and insert?
> If I have two iso time stamps, how can I insert them into the interval
> datatype?  What are some ways to format the output of an interval type?
>
>         Note: When working in perl, I have found the "Perl Cookbook" the most
> valuable asset I have.  I think we should get together and produce a web
> site where people can submit various type of code involving postgres, so
> that newbies (such as myself) have lots of material to learn from.  I'll
> have plenty of examples to submit when I'm done with this project.  And
> I'd do it myself, but I'm not really a web guy.
>
>         Thanks for the help

select interval( datetime('now') - datetime('today'));
     interval
-------------------
 @ 28 mins 32 secs
(1 row)

Just as a suggestion...

Cheers,
                    Andrew.
--
_____________________________________________________________________
            Andrew McMillan, e-mail: Andrew@cat-it.co.nz
Catalyst IT Ltd, PO Box 10-225, Level 22, 105 The Terrace, Wellington
Me: +64 (21) 635 694, Fax: +64 (4) 499 5596, Office: +64 (4) 499 2267

pgsql-general by date:

Previous
From: "Oakley "
Date:
Subject: List of Large sites using Postgres
Next
From: mikeo
Date:
Subject: Re: bytea question