Skip to content

Instantly share code, notes, and snippets.

@joevandyk
Last active December 17, 2015 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joevandyk/d14fd860f4270a5cc17d to your computer and use it in GitHub Desktop.
Save joevandyk/d14fd860f4270a5cc17d to your computer and use it in GitHub Desktop.
create table f (
i interval
);
insert into f values ('4 days');
insert into f values ('6 years');
insert into f values ('30 minute');
select * from f;
----------
4 days
6 years
00:30:00
(3 rows)
select now(), now() + i from f;
-------------------------------+-------------------------------
2013-05-08 15:34:30.052171-07 | 2013-05-12 15:34:30.052171-07
2013-05-08 15:34:30.052171-07 | 2019-05-08 15:34:30.052171-07
2013-05-08 15:34:30.052171-07 | 2013-05-08 16:04:30.052171-07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment