I’m going through the video tutorial, though I’m using an Oracle database. I manually created records in the table posts, and retreiving the records from the database table worked fine… But when I got to the part regarding saving to the database, I get this error:
insert into “posts” (“body”, “created_at”, “title”, “updated_at”) values (:1, :2, :3, :4) returning “id” into :5 - ORA-01861: literal does not match format string
I’m not able to move past this. Here’s what I tried so far:
changing the updated_at and created_at fields in the posts table to be DATE instead of TIMESTAMP… still no luck
I read the post at https://adonisjs.svbtle.com/curious-case-of-date-formats-in-data-models
Regarding how the default format is: YYYY-MM-DD HH:mm:ss
In oracle, when using the to_date function… the equivalent format would be: YYYY-MM-DD HH:MI:SS
I’m wondering if the difference in MI vs SS has something to do with the error?
I tried using the formatDates to control the format, but no luck on that either.
Through debugging, I do see the bind variables change depending on the format I give it… but I still always get this error