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

Re: Is there a way to get just the number of seconds between two timestamps?

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: A B <gentosaker(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Is there a way to get just the number of seconds between two timestamps?
Date: 2009-04-08 15:26:04
Message-ID: 49DCC20C.9050902@pinpointresearch.com (view raw or flat)
Thread:
Lists: pgsql-novice
A B wrote:
> I want to just get the number of seconds and not have to use extract
> for seconds, minutes, hours, days, months, years, etc.
> Is that possible?
>
>   
extract(epoch from your_end_time) - extract(epoch from your_start_time)

Cheers,
Steve


In response to

pgsql-novice by date

Next:From: Michael LushDate: 2009-04-08 15:36:38
Subject: Re: Is there a way to get just the number of seconds between two timestamps?
Previous:From: A BDate: 2009-04-08 15:14:36
Subject: Is there a way to get just the number of seconds between two timestamps?

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