Search Postgresql Archives

Re: Date addition/subtraction

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

 



On Tue, 2005-05-03 at 12:32, Craig Bryden wrote:
> Hi
> 
> How in postgres can I do date/time subtraction or addition.
> e.g. If I want to get today's date - 30 days? or current_timestamp - 1 hour?


select now()-interval'1 hour'

and so on.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[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