简体   繁体   中英

Converting String to Timestamp in BigQuery

I am trying to convert this string '1/17/2022, 11:59 PM' into timestamp (Like "01/17/2022 11:59:00 PM") in BigQuery.

Edit: timestamp 2022/01/17 23:59:00 UTC

I have tried with PARSE_DATE function but it did not allow me to convert string. I'd appreciate your help.

Consider to use below query.

SELECT PARSE_TIMESTAMP('%m/%d/%Y, %I:%M %p', '1/17/2022, 11:59 PM') ts

在此处输入图像描述

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