Rejarul
Rejarul

Reputation: 153

How to write a query in Google Spreadsheet that returns date >= today?

I am writing the following =filter formula in Google spreadsheet: =FILTER('Tab'!6:1963, ‘Tab’!E6:E1963 = "Major", ’Tab’!D6:D1963 > NOW())

Column D are dates and I am interested in including today. For instance today is the 7/19 and I would like to have the data that includes 7/19. My current formula returns values only from tomorrow (7/20). I tried the now()-1 but returned an #VALUE!.

Any help?

Upvotes: 1

Views: 145

Answers (1)

RocketDonkey
RocketDonkey

Reputation: 37249

NOW() returns a datetime object (which includes the time). If you are comparing with a date, NOW() will (almost :) ) always be greater than the date alone (which would have a time component of 12:00 A.M., which is essentially 0).

Try using TODAY() to get the date only (adding/subtracting 1 will use tomorrow/yesterday, respectively).

Upvotes: 1

Related Questions