SetDate can not work
See original GitHub issueWhen I use setDate
method in ClickHousePreparedStatementImpl
like below
statement_1.setDate(19, new Date(System.currentTimeMillis()));
It throw a exception and tell me garbage after DateTime('America/Phoenix'): "08<TAB>9169210"
and I change to statement_1.setString(19, "1970-01-01 16:00:00");
it can work success
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
jQuery UI Datepicker - setDate not working - Stack Overflow
1 Answer 1 ... You have to initialize the datepicker first: $('#datepicker').datepicker();. When you pass setDate, you are calling a method which ...
Read more >jQuery UI Datepicker - setDate not working - YouTube
jQuery : jQuery UI Datepicker - setDate not working [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] jQuery : jQuery UI ...
Read more >Date.prototype.setDate() - JavaScript - MDN Web Docs - Mozilla
The setDate() method changes the day of the month of a given Date instance, based on local time. To instead change the day...
Read more >JavaScript Date setDate() Method - W3Schools
setDate () sets the day of the month of a date. Example 2. Set the day of the month to the last day...
Read more >Synchronization from a set date, don't work
(We are OK with everything {apparently}, but the sync doesnt work). We try to synchronize from a more updated date, using the option...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Now the new driver uses RowBinary format instead of TabSeparated so it should work. I don’t have a full example to verify but in general it’s better to use
java.time.LocalDate
instead ofjava.sql.Date
, and usePreparedStatement.setObject
to set parameter.Thanks for the extra information. I thought the driver only has issue with 21.3 but looks like it has problem with 21.2 too. I believe there’s issue introduced on server side causing the problem, but I’ll fix this by replacing text-based format to binary.