2
select date(s.request_timestamp) dt,

is giving me a column of dates and times in utc. I have tried using

select from_tz

and

select convert_tz 

functions but with no luck. I keep getting an error. Any thoughts?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Max
  • 31
  • 4
  • Which database system are you using? – Dai Jun 30 '17 at 04:29
  • Note that it's generally a bad idea to perform timezone conversion in SQL (on a database server) because that requires keeping a separate timezone database file which must be updated regularly (as different countries regularly update their daylight savings policies, often on an annual basis). Ideally it should be performed as close to the view-layer as possible. – Dai Jun 30 '17 at 04:30
  • this is for metabase – Max Jun 30 '17 at 04:30
  • Which "metabase"? There are multiple products with that name. – Dai Jun 30 '17 at 04:31
  • I also only need this data to show in PST (as my records are only based off of California, USA) – Max Jun 30 '17 at 04:32
  • You're on version v0.24.2 Built on 2017-06-01 Metabase is a Trademark of Metabase, Incand is built with care in San Francisco, CA – Max Jun 30 '17 at 04:33
  • If it's _that_ [Metabase](http://www.metabase.com/) then it's just the frontend. It uses a regular relational database as its backend. So which DBMS _are_ you using as the backend storage? Postgres? Oracle? –  Jun 30 '17 at 06:10
  • I think this link would help you: https://stackoverflow.com/questions/8038744/convert-datetime-column-from-utc-to-local-time-in-select-statement – Raymond Dumalaog Sep 15 '17 at 16:28

0 Answers0