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

how to convert a time interval to seconds?

From: Chansup Byun <Chansup(dot)Byun(at)Sun(dot)COM>
To: pgsql-novice(at)postgresql(dot)org
Subject: how to convert a time interval to seconds?
Date: 2006-09-12 14:39:25
Message-ID: 4506C69D.9030501@sun.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hi,

I searched how to convert a time interval to seconds but failed to find
an example.

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
         55 |           0 | 2006-04-13 08:47:51 | 00:01:21
         58 |           0 | 2006-04-13 08:47:54 | 00:01:28
         60 |           0 | 2006-04-13 08:47:55 | 00:01:27

Thanks,

- Chansup


Responses

pgsql-novice by date

Next:From: Michael FuhrDate: 2006-09-12 14:55:03
Subject: Re: how to convert a time interval to seconds?
Previous:From: Sree NarayanaDate: 2006-09-12 14:33:22
Subject: Re: Sorry.Problme in my pg_restore command.

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