1
00:00:00,080 --> 00:00:04,526
A QUERY date filter can miss real-looking dates when the column

2
00:00:04,526 --> 00:00:08,601
contains text or the query string uses the wrong date syntax.

3
00:00:08,601 --> 00:00:12,676
We will build numeric dates, specify one header row, and verify

4
00:00:12,676 --> 00:00:15,269
three October orders totaling three hundred dollars.

5
00:00:15,869 --> 00:00:19,172
Open the fictional CSV in a private Google Sheet.

6
00:00:19,172 --> 00:00:23,210
Year, Month, and Day are separate numeric columns, so they cannot

7
00:00:23,210 --> 00:00:25,779
be mistaken for a regional text date.

8
00:00:25,779 --> 00:00:29,816
In F2 use DATE with those parts, fill through F6, and

9
00:00:29,816 --> 00:00:32,018
format the five results as dates.

10
00:00:32,618 --> 00:00:37,244
The October interval starts on October first and stops before November first.

11
00:00:37,244 --> 00:00:41,870
That includes October thirty-first but excludes the first moment of November.

12
00:00:41,870 --> 00:00:47,267
Use the query language's date keyword followed by an ISO year-month-day

13
00:00:47,267 --> 00:00:51,508
literal, even if the sheet displays a different US date style.

14
00:00:52,108 --> 00:00:56,115
In a clear output area enter the QUERY formula selecting Item

15
00:00:56,115 --> 00:00:59,394
and Amount, filtering F between the two date literals.

16
00:00:59,394 --> 00:01:03,037
The final argument is one because row one contains headers.

17
00:01:03,037 --> 00:01:07,409
The source and output must not overlap, or a valid three-row

18
00:01:07,409 --> 00:01:08,866
result may be blocked.

19
00:01:09,466 --> 00:01:13,651
The result should contain Pens for one hundred dollars, Folders for

20
00:01:13,651 --> 00:01:17,075
seventy-five, and Labels for one hundred twenty-five.

21
00:01:17,075 --> 00:01:21,260
Paper belongs to September and Tape to November, so neither appears.

22
00:01:21,260 --> 00:01:25,445
Add the three included values independently to get three hundred dollars.

23
00:01:26,045 --> 00:01:30,146
If the result is empty or errors, inspect the date keyword

24
00:01:30,146 --> 00:01:34,994
and ISO quotes first, then confirm F contains numeric dates rather than text.

25
00:01:34,994 --> 00:01:37,604
Also confirm the header count is one.

26
00:01:37,604 --> 00:01:41,706
Changing the cell display format alone does not convert a text

27
00:01:41,706 --> 00:01:43,571
string into a real date.
