Skip to content

Instantly share code, notes, and snippets.

@Xordal
Last active January 1, 2016 12:09
Show Gist options
  • Save Xordal/8142974 to your computer and use it in GitHub Desktop.
Save Xordal/8142974 to your computer and use it in GitHub Desktop.
DateDiff(min, :toDate, :fromDate) for PostgreSql
SELECT extract(epoch from (to_timestamp(:toDate, 'DD.MM.YYYY HH24:MI') - to_timestamp(:fromDate, 'DD.MM.YYYY HH24:MI'))) / 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment