Skip to content

Instantly share code, notes, and snippets.

@ramiroaznar
Last active October 13, 2016 10:59
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 ramiroaznar/78c41af38f9f8432a41446a36ab21179 to your computer and use it in GitHub Desktop.
Save ramiroaznar/78c41af38f9f8432a41446a36ab21179 to your computer and use it in GitHub Desktop.
How to transform two date and hour columns to one timestamp column
SELECT
*,
to_timestamp(date_col || ' ' || hour_col, 'DD-MM-YYYY HH24-MI-SS') as date_hour
FROM
table_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment