How to parse a string time '16-AUG-22 01.50.20' to datetime bigquery

Viewed 18

How can I parse a following string timestamp to timestamp from BigQuery: "16-AUG-22 01.50.20.000000 PM"?

1 Answers

Use below as an example

select parse_timestamp('%d-%b-%y %I.%M.%E*S %p', "16-AUG-22 01.50.20.000000 PM")          

with output

enter image description here

Related