Search Postgresql Archives

Re: subtracting minutes from date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 23, 2006 at 03:08:32PM -0600, Scott Marlowe wrote:
> >   SELECT * FROM table WHERE date < now()::DATE::(TIMESTAMP - 60);
> 
> Tell it you're subracting a minute:
> 
> select now() - interval '13 minutes';

Or, better yet if you're feeding in a variable:

date < now() - ( 13 * '1 minute'::interval )
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@xxxxxxxxxxxxx
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux