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 like oracle NLS_CALENDAR #10394

Open
mbtolou opened this issue Apr 21, 2020 · 4 comments
Open

date format like oracle NLS_CALENDAR #10394

mbtolou opened this issue Apr 21, 2020 · 4 comments
Labels
feature minor Priority: minor

Comments

@mbtolou
Copy link

mbtolou commented Apr 21, 2020

Hi

can you implement NLS_CALENDAR like oracle :

select TO_CHAR(SYSDATE, 'MM/DD:HH24', 'NLS_CALENDAR=PERSIAN') from dual

@qoega
Copy link
Member

qoega commented Apr 21, 2020

ClickHouse is an OpenSource product, so you can try to implement it yourself.
https://github.com/ClickHouse/ClickHouse/blob/master/CONTRIBUTING.md

@alexey-milovidov
Copy link
Member

@qoega Supporting different kind of calendars: Persian, Thai, Julian... - is not an easy task to do in general.

Maybe we can just do a shortcut by using fixed shift amounts in days. But it still requires research.

@alexey-milovidov
Copy link
Member

A link for curious readers: https://zachholman.com/talk/utc-is-enough-for-everyone-right

@mbtolou
Copy link
Author

mbtolou commented Apr 26, 2020

I use join table with date column

SELECT joinGet('DATE_INFO_DICT', 'SHAMSI', today())

@alexey-milovidov alexey-milovidov added the minor Priority: minor label May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature minor Priority: minor
Projects
None yet
Development

No branches or pull requests

3 participants