redash
redash copied to clipboard
Date/DateTime parameter output should be configurable
The output generated from a Date/Time parameter should be ISO compliant at the very minimum. Or then configurable. As an example Elasticsearch offers at least 20 readable query formats and with the exception of just using a simple Date nothing matches with the output of Redash.
The current default (YYYY-MM-DD HH:mm) was picked because it's supported by all the major databases we support. I did notice Postgres supports ISO format as well, but I don't know if the others support it.
Anyway I agree it should be configurable.
I think it's a userful feature. I have some tables separated by day, and their format likes 'YYMMDD' and so on. I need to format my datetime parameter like this in some query, not only the default(YYYY-MM-DD HH:mm).
I'm trying to query partitioned data with this format "yyyy/MM/dd/HH" as seen here: https://docs.aws.amazon.com/athena/latest/ug/partition-projection-kinesis-firehose-example.html
Redash does not let me set the format of the output...
I can second that it would be super useful to have a custom Date format outputted for Date parameters. Otherwise we have to manipulate the format ourselves and that can mess up triggering index usage.
I agree...I would specifically use this for a JSON data source/query where the post to the rest api allows for searching by start/end dates, but the dates are in a non-standard format (MM/DD/YYYY)