Use of 'interval'

Started by Tom Allisonover 21 years ago3 messagesgeneral
Jump to latest
#1Tom Allison
tallison@tacocat.net

I'm digging throught the data types and am trying to understand how to
utilize the interval data type.

I'm thinking I can use these values to add to another date field...

Can someone give a simplified example of how I might use this?

#2Gaetano Mendola
mendola@bigfoot.com
In reply to: Tom Allison (#1)
Re: Use of 'interval'

Tom Allison wrote:

I'm digging throught the data types and am trying to understand how to
utilize the interval data type.

I'm thinking I can use these values to add to another date field...

just add them: timestamp + interval = timestamp

Regards
Gaetano Mendola

#3Mage
mage@mage.hu
In reply to: Tom Allison (#1)
Re: Use of 'interval'

Tom Allison wrote:

Can someone give a simplified example of how I might use this?

select '2004.12.31. 13:57:42'::timestamp + '3days 52hours';

Mage