Error when trying to update record.

38 views
Skip to first unread message

Gabriel Batista da Silva Nogueira

unread,
Mar 15, 2023, 3:07:54 PM3/15/23
to AtoM Users
Hi, 

I tried to update a record, and the date came incorrectly, according to the log:

PHP message: Unable to execute UPDATE statement. [wrapped: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect date value: '1934-0-0' for column 'start_date' at row 1]

where do i go to fix this error? I didn't find anything related
Note: I'm in version 2.7.1 I just updated

Dan Gillean

unread,
Mar 15, 2023, 3:33:26 PM3/15/23
to ica-ato...@googlegroups.com
Hi Gabriel, 

Usually when I have seen these errors in the past, it is because you have not correctly set the expected SQLmodes during installation and configuration. See the last part of this section: 
You will especially want to make sure that you are not using the NO_ZERO_IN _DATE mode, as that is what I suspect is happening here. We have instructions on how you can check and update your SQL modes here: 
In the short term, a simple workaround that might work: add full start and end dates in the controlled values. So for example, if the dates you entered were 1934 - 1936, enter these in the Start and End date fields as 1934-01-01 and 1936-12-31 respectively. This avoids the error, and as a bonus, will actually give your end users better date range search results. \

Let us know if that helps! 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/cae48925-d205-42b4-b34d-f26be19b6d0en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages