SilentHG
SilentHG

Reputation: 109

Query Selector, Where Clause comparing dates

I am trying to get the selective data from a Sheet.

I am getting Column U in comparision with Column P

Column U = Unique Data
Column P = Date and Time Associated with it.
Column U        Column P
564865          2020-06-13 5:52:00

I would like to get the data of the day before current day while truncating time of Column P.

i am trying to use this query, but i am getting some error.

=QUERY('Shopify Unfulfilled'!1:2615,"Select U WHERE "&LEFT('Shopify Unfulfilled'!P:P,10)& "=" &TODAY()-1&"")

ERROR:

Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " <ID> "Created "" at line 1, column 16. Was expecting one of: "(" ... "(" ...

Thank you.

Upvotes: 0

Views: 55

Answers (1)

JPV
JPV

Reputation: 27262

See if this works

=QUERY('Shopify Unfulfilled'!1:2615,"Select U WHERE todate (P) = date '"&TEXT(today() -1, "yyyy-MM-dd")&"'", 1)

Upvotes: 2

Related Questions