Could you please help to convert String to DateTime in Bigquery? The length of String are different below, cause there's no 0 in a single number of date month, hour.
4/14/2016 8:00:00 PM
5/7/2016 5:00:00 P
I try to use PARSE_TIMESTAMP function but error "Failed to parse input string "4/14/2016 8:00:00 PM""
CodePudding user response:
Use below
select parse_timestamp('%m/%d/%Y %r', col) ts
if applied to sample data in your question - output is