-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support time in date parameters #7418
Comments
Thanks for pointing this out, @petar777. The "All Options" Date filter widget on dashboards should be exactly the same as the graphical query builder date filter, but it isn't: |
This is primarily because we haven't come up with a way to serialize times in the query string. Ideally we'd only use "url safe" characters, i.e. Maybe something like |
Genuine question, I'm probably missing some context; isn't that what percent encoding is for? |
Is this feature coming still, has someone come up with a solution? |
This comment was marked as duplicate.
This comment was marked as duplicate.
A common approach I've seen is to base64 encode the parameters. Then you can use whatever transport format you like. In JavaScript const start = '2021-07-21T00:00:00.000Z';
const end = '2021-07-21T23:59:59Z';
const dateRangeFilter = encodeURIComponent(btoa(`${start}~${end}`));
fetch(`/query?dateRangeFilter=${dateRangeFilter}`, { method: 'POST' ... }) Produces You could probably go down to millisecond level at that point with some tweaking. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This works at least in the last versions |
Hello,
When I create a custom question I am capable of setting not only the date but the time in my date filter too. To be more precise- I choose the date column which I want to use. Then select "Between" from the drop-down menu where the user chooses the options of the date filter. Once there, I can set the date but beneath of the date, I can see an "Add Time" option. This feature works perfectly and is very useful...
However, if I want to create a more complex query and add a date variable or field filter, which I will later on control via the dashboard filter- I am not able to see the "Add Time" option no matter what I select from the drop-down menu.
Is it possible to manually select time from a dashboard filter or SQL field filter?
All the best :)
⬇️ Please click the 👍 reaction instead of leaving a
+1
orupdate?
commentThe text was updated successfully, but these errors were encountered: