I'm trying to convert an entire column to datetime in BigQuery. I had to bring it into SQL as string because datetime kept throwing errors. The current format of my data is
Row date_hour
1 4/12/2016 3:00:00 AM
2 4/12/2016 4:00:00 AM
3 4/12/2016 5:00:00 AM
4 4/12/2016 6:00:00 AM
I want to convert this to datetime, so I can summarize by days of the week, but all my syntax keeps throwing errors.
I tried:
SELECT date_hour
FROM `turing-bebop-390023.Fitness_tracker_data.hourly_steps`
CONVERT(datetime, date_hour, 100)
LIMIT 1000
I admit that I'm very new to SQL, so I don't know exactly how to write the syntax.