How to filter on date in Big query

Viewed 22985

I'm trying to figure out how to properly filter on dates in big query. For instance in MS sql I do:

Select a, b, date from table_1 where date >= '2017-05-01' 

In big query the filter doesn't work and it returns all the records. I tried

Select a, b, date from table_1 where date >= Date("2017-05-01")
Select a, b, date from table_1 where date >= 2017-05-01
Select a, b, date from table_1 where date >= timestamp('2017-05-01')

None of those worked. The documentation mentioned creating a partitioned table, but I'm not sure that is what I need to do ( and I hope not).

Please help :(

2 Answers
Related