Skip site navigation (1) Skip section navigation (2)

Re: how to convert a time interval to seconds?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Chansup Byun <Chansup(dot)Byun(at)Sun(dot)COM>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: how to convert a time interval to seconds?
Date: 2006-09-12 14:55:03
Message-ID: 20060912145502.GA65688@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-novice
On Tue, Sep 12, 2006 at 10:39:25AM -0400, Chansup Byun wrote:
> I searched how to convert a time interval to seconds but failed to find
> an example.

Searching the list archives for "interval to seconds" returns many
examples.  See also "Date/Time Functions and Operators" in the
documentation.

http://archives.postgresql.org/
http://www.postgresql.org/docs/8.1/interactive/functions-datetime.html

EXTRACT(EPOCH FROM interval_value)

> I want to convert the following wait_time column into seconds. How can I
> do that? The datatype for the wait_time is time without timezone.
> 
>  job_number | task_number |   submission_time   | wait_time
> ------------+-------------+---------------------+-----------
>          56 |           0 | 2006-04-13 08:47:53 | 00:01:28

Does wait_time represent a duration?  If so then why is it a time
without timezone instead of an interval?

-- 
Michael Fuhr

In response to

pgsql-novice by date

Next:From: Elias ChavarriaDate: 2006-09-12 14:59:21
Subject: suscribe please
Previous:From: Chansup ByunDate: 2006-09-12 14:39:25
Subject: how to convert a time interval to seconds?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group