santhoshgs
santhoshgs

Reputation: 13

Unable to Save Timestamp and Timezone in Google BigQuery Timestamp datatype column

Use Case :

I'm trying to store Timestamp and Timezone into Google BigQuery TIMESTAMP datatype column(format suggested by google docs) :

'2014-09-27 12:30:00.45 America/New_York'

i'm getting below error while i try to store.

'Unrecognized timezone: America/New_York'

Note :Have tried alternate way by giving TimeZone with hour offset from UTC, but no luck :

'2014-09-27 12:30:00.45-8:00'

is there any one alternate way to store Timestamp along with Timezone ?

Upvotes: 0

Views: 184

Answers (1)

Anurag Yadav
Anurag Yadav

Reputation: 396

I am not sure if i understood your question correctly. I think you're trying to use timestamp function to store date, time and timezone information.

Try using below code for this:

Select TIMESTAMP("2008-12-25 15:30:00", "America/Los_Angeles") as dt,STRING( TIMESTAMP "2008-12-25 15:30:00","America/Los_Angeles") as dt_string

Please see the below screenshot :

enter image description here

I hope this helped.

Upvotes: 0

Related Questions