On Tue, Dec 13, 2005 at 18:34:36 -0400,
  "Marc G. Fournier" <[EMAIL PROTECTED]> wrote:
> 
> Is there a simpler way of doing this then:
> 
> select (date_part('epoch', now()) -
>         date_part('epoch', now() - '30 days'::interval)) / ( 5 *  60 );

Are you trying to do this:
select extract(epoch from '30 days'::interval) / 300;

The above works in 8.0, but I don't know for sure what it does in 8.1.
Probably it just treats days as 24 hours, similar to how months are treated
as having 30 days.

> 
> ----
> Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
> Email: [EMAIL PROTECTED]           Yahoo!: yscrappy              ICQ: 7615664
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to