date-exception - invalid date-time-formate with hsqldb table

Einfach Dinge, die nichts mit XAMPP, Apache Friends, Apache, MySQL, PHP und alle dem zu tun haben. Allerlei halt. ;)

date-exception - invalid date-time-formate with hsqldb table

Postby unleash_it » 30. December 2019 14:05

good day dear Apachefriends,


while trying to import data to a hsqldb table i allways get errors.

die data-exception:

data exception: invalid datetime format do you want to continue


question - should i change

from
Code: Select all
 08.12.2020
09.12.2020
10.12.2020


to:

Code: Select all
20020-12-08
20020-09-08
20020-10-08

see also: https://stackoverflow.com/questions/398 ... mm-dd?rq=1

question: Can someone please tell me what is wrong?

answer: The answer is simply that HSQLDB will only accept string literals for dates if they follow the 'yyyy-mm-dd' format. It is willing to be helpful – to a point – in that it will allow us to omit the DATE keyword from a "proper" HSQLDB date literal value

DATE '2016-01-02'

and let us simply provide

'2016-01-02'

but it will not accept '01/02/2016' (which is ambiguous, anyway) or any of the many other ways that we silly humans can represent dates.


look forward to hear from you

best regarsd
Interessen: Bikes & steel frames: Linux & SBC https://www.allaboutcircuits.com :: die neuen Knowledge-Base: AFFiNE: There can be more than Notion and Miro. auf affine.pro :: WordPress Entwicklung - sic: make.wordpress.org/core/
User avatar
unleash_it
 
Posts: 779
Joined: 10. December 2011 18:32
Operating System: linux opensuse 12.1

Return to Allerlei

Who is online

Users browsing this forum: No registered users and 39 guests

cron