Skip to content

Instantly share code, notes, and snippets.

@dineshsprabu
Created December 21, 2017 11:58
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 dineshsprabu/6c745c172dabaf6e9a3f776d9d38f1a2 to your computer and use it in GitHub Desktop.
Save dineshsprabu/6c745c172dabaf6e9a3f776d9d38f1a2 to your computer and use it in GitHub Desktop.
[Postgres] Time based queries

Add interval to timestamp value

select (<column-name>::timestamp::date + interval '1 week') as inter from <table-name> limit 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment