-
Couldn't load subscription status.
- Fork 301
Open
Labels
bugSomething isn't workingSomething isn't workingto-reviewEvidence team to reviewEvidence team to review
Description
Describe the bug
The date_range.start is the day before the actual value selected. See below example where DateRange has a selection of Jan 1, 2024 - Dec 31, 2024, but the value of inputs.selected_date_range.start used in the query is 2023-12-31. I'm in the GMT+1 time zone.

Steps to Reproduce
Here is the sample code to reproduce:
---
title: Date range bug
---
<DateRange
name=selected_date_range
title="Date Range"
defaultValue='Last 12 Months'
/>
```sql filtered_orders
WITH sample_orders AS (
SELECT * FROM (
VALUES ('2023-12-31'::DATE, 'Customer A', 1500.00), ('2024-01-15'::DATE, 'Customer B', 2300.00),
('2024-01-28'::DATE, 'Customer C', 1800.00)
) AS t(date, customer_name, price)
)
SELECT * FROM sample_orders
WHERE date between '${inputs.selected_date_range.start}' and '${inputs.selected_date_range.end}'
ORDER BY date ASC
```
<DataTable data={filtered_orders} />
Logs
System Info
Severity
serious, but I can work around it
Additional Information, or Workarounds
No response
markgraphene, biscout42, vglagoleva, Barlock42, justdmitry and 1 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingto-reviewEvidence team to reviewEvidence team to review