-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Need Help with Oracle Data Time Format #806
Comments
@dineshbabu179 is this the only date format you are using or other like date time and time? |
Yes, I am trying to save the date and time in ISO format YYYY-MM-DDTHH:mm:ss.SSS example Input {
"first_name": "Zita",
"last_name": "Davis",
"email": "Clint.Smitham@example.com",
"created_at": "2024-12-31T23:59:59.000Z" // or with 2024-12-31T23:59:59-06:00
} "status": 400, |
Checking. |
@dineshbabu179 I just used the same date time format and was able to insert a record. Please find attached screenshot. |
@dineshbabu179 - please review the update from @souravroy Also which version of oracle are you using. |
Oracle DB Version 12.1.0.2.0 My Table Spec POST /v1/rdbms/INT/XXKG_POC_EMPLOYEE {
"FIRST_NAME": "Herbert",
"LAST_NAME": "Smith",
"HIRE_DATE": "2024-12-31T23:59:59.000Z"
} RESPONSE {
"type": "https://db2rest.com/error/generic-error",
"title": "Generic Data Access Error",
"status": 400,
"detail": "Error insert - PreparedStatementCallback; SQL [\nINSERT INTO XXINT.XXKG_POC_EMPLOYEE\n (FIRST_NAME,LAST_NAME,HIRE_DATE)\nVALUES\n (?,?,?)\n]; ORA-01861: literal does not match format string\n",
"instance": "/db2rest/v1/rdbms/INT/XXKG_POC_EMPLOYEE",
"errorCategory": "Data-access-error",
"timestamp": "2024-12-03T21:56:24.341105399Z"
}
|
@dineshbabu179 You would need to change your database column type to a @kdhrubo In our Oracle Dialect code, we do handle datatype with Although this is not our direct problem, it's a String format not matching the DB's column datatype format expected. But I detest automatic date conversions. I think that makes some folks very happy, and then others very unhappy when unexpected. |
Got hold of an Oracle 12c-xe image. Will triage over the weekend. |
@dineshbabu179 It is working for me with |
@dineshbabu179 - its working per the triage by @souravroy |
@kdhrubo thank you. I will check this out in my test env. |
Thank you for the wonderful project! I recently came across it and decided to give it a try for my personal project.
However, I encountered an issue while testing the db2rest application with an Oracle database. When inserting records into a table, the date field seems to be causing a problem.
Here’s the request I used:
I have tried various date along with time formats, but none seem to work. Could you please let me know the correct way to send date-time values to Oracle for INSERT operations?
Thanks and regards,
Dinesh
The text was updated successfully, but these errors were encountered: