Reputation: 110203
How would I do the following in BigQuery?
date in (now() - interval 1 day, now() - interval 2 day)
Basically, I want to get the following:
date IN ("2020-05-18", "2020-05-17")
Upvotes: 1
Views: 660
Reputation: 172993
date in (DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY), DATE_SUB(CURRENT_DATE(), INTERVAL 2 DAY))
Upvotes: 1
Reputation: 1269873
How about direct comparisons:
date >= date('2020-05-17') and
date <= date('2020'05-18')
Or, if you prefer:
date in (date('2020-05-17'), date('2020'05-18'))
Upvotes: 0