1
votes

I am trying to translate a timezone conversion query from bigquery to presto, the existing bigquery syntax is as the following:

timestamp(datetime('2019-07-01'), 'US/Pacific')

but is this bigquery syntax incorrect to begin with? thanks!

1

1 Answers

0
votes

It is correct.

Also, consider below - depends on what exactly output you expect

TIMESTAMP('2019-07-01', 'US/Pacific')

or

DATETIME('2019-07-01', 'US/Pacific')

The syntax is

TIMESTAMP(
  string_expression[, timezone] |
  date_expression[, timezone] |
  datetime_expression[, timezone]
)   

or

DATETIME(timestamp_expression [, timezone])