Skip to content
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

Date format in reports #3791

Closed
maliayas opened this issue Nov 21, 2016 · 7 comments
Closed

Date format in reports #3791

maliayas opened this issue Nov 21, 2016 · 7 comments
Milestone

Comments

@maliayas
Copy link
Contributor

maliayas commented Nov 21, 2016

Do you have any plan to add a setting for how to display dates? As far as I see, currently only English localized dates are supported. Sometimes, other formats may be needed such as 2016-11-21 11:33:23. IMHO, there should be a system wide setting in the admin panel and a user-wide setting under Account Settings which overrides the system setting.

Thanks in advance.

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

@LukeAbell
Copy link

+1

@ipeevski
Copy link
Contributor

Also dates sometimes need to be overwritten for a particular report. If there is a date formatting function (date, yeardate, week, etc), there probably shouldn't be more logic added by metabase to override that with a set format.

@YoungHu
Copy link

YoungHu commented Apr 1, 2017

OR where can i change the date format in metabase project source code?

@tanzoniteblack
Copy link
Contributor

I agree with @cyberhorse , it would be useful if we were able to format date/timestamps as a feature in the query builder.

Ran across a specific use case today, where I'm storing a timestamp with timezone in postgres, and need it that way for several data points, but our billing department only wants one of the final reports to have the date, not the timestamp. It's easy enough in a raw SQL question to cast a datetime to a date, or apply a specific string format, but there doesn't seem to be a way to do this through the query builder.

@joermungandr
Copy link

I would also like to have this feature :-) Or is it possible to change the date format now? I tried to use sql's date_format command, but metabase's query editor says, that this function is not existent ... any suggestions?

@peterjlu
Copy link

peterjlu commented Nov 22, 2017

If you're trying to export the data somewhere else (e.g. to Excel), and you want to format the date/timestamp so that it doesn't show that ugly "2017-04-28T00:00:00.000-07:00" format by default, you can turn it from a time (which Metabase seems to always display like above), into plain text. Now you'll be able to export truncated dates without seeing that extra long string of zeros at the end. Just do:

to_char([timestamp],'YYYY-MM-DD')

See here for formatting options for Postgres: https://www.postgresql.org/docs/9.3/static/functions-formatting.html

@mazameli mazameli added this to the 0.31 milestone Oct 10, 2018
@mazameli
Copy link
Contributor

Implemented via #8479 and #8620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants