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

#1: Fixed dialect for conversion from time to timestamp. #3

Merged
merged 1 commit into from
Dec 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/exasol_odbc/dialect.tdd
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@
<argument type='real' />
</function>
<function group='cast' name='DATETIME' return-type='datetime'>
<formula>TO_TIMESTAMP(%1)</formula>
<!-- Note that the date 1901-01-31 is a magic number in Tableau, used to signal that a date/time value acually only has a time component. -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<!-- Note that the date 1901-01-31 is a magic number in Tableau, used to signal that a date/time value acually only has a time component. -->
<!-- Note that the date 1901-01-31 is a magic number in Tableau, used to signal that a date/time value actually only has a time component. -->

<formula>IF REGEXP_INSTR(%1, '^\d\d?:\d\d?:\d\d?(?:\.\d{1,6})?$') > 0 THEN TO_TIMESTAMP('1901-01-31 ' || %1) ELSE TO_TIMESTAMP(%1) ENDIF</formula>
<argument type='str' />
</function>
<function group='cast' name='DATETIME' return-type='datetime'>
Expand Down