简体   繁体   中英

BigQuery UTC hardcoded removal

I have some time stamp column which have data like-2022-12-02 10:30:35 AM UTC I want to remove UTC from this data. This table is in big query

Another approach will be using format_timestamp() . See approach below:

with sample_data as (
  select parse_timestamp("%Y-%m-%d %H:%M:%S %p %Z",'2022-12-02 10:30:35 AM UTC') as test_time
)

select 
  format_timestamp("%Y-%m-%d %H:%M:%S %p",test_time) as new_format 
from sample_data

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM