Skip to content

Instantly share code, notes, and snippets.

@gerep
Created August 22, 2017 13:28
Show Gist options
  • Save gerep/f8ba5a46a6e6e239a0db8c98c2aa2062 to your computer and use it in GitHub Desktop.
Save gerep/f8ba5a46a6e6e239a0db8c98c2aa2062 to your computer and use it in GitHub Desktop.
PostgreSQL: yesterday, today, tomorrow
select TIMESTAMP 'yesterday';
select DATE 'yesterday';
select TIMESTAMP 'today';
select DATE 'today';
select TIMESTAMP 'tomorrow';
select DATE 'tomorrow';
select TIME 'allballs';
select now();
select TIMESTAMP 'now';
select DATE 'now';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment