redash icon indicating copy to clipboard operation
redash copied to clipboard

Date/DateTime parameter output should be configurable

Open ssozonoff opened this issue 7 years ago • 4 comments

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.

ssozonoff avatar Dec 10 '18 12:12 ssozonoff

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.

arikfr avatar Dec 10 '18 12:12 arikfr

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).

xiejianhe avatar Dec 26 '18 03:12 xiejianhe

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...

damiendube avatar May 14 '21 20:05 damiendube

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.

triespe avatar Apr 04 '22 09:04 triespe

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)

akarsten avatar Sep 16 '23 23:09 akarsten