Best answer

“Incorrect date value” error on inserting date type data to MySQL

  • 25 November 2021
  • 2 replies
  • 15 views

 

When insert “2021-10-27” data on Spreadsheet to Date type cell on MySQL, following error occur.

As you can see from the error message, the original ”2021-10-27” has changed to ”2021-10-27T00:00:00-05:00”, this seems to be the cause of error.

If anyone knows how to solve this problem, could you please teach me?

 

----Error Message---

(pymysql.err.InternalError) (1292, "Incorrect date value: '2021-10-27T00:00:00-05:00' for column 'update_date' at row 1")


 

 

 

 

icon

Best answer by robschmidt 25 November 2021, 16:54

View original

2 replies

Userlevel 7
Badge +7

Hi @RH0306 

This probably is an issue the timezone value at the end

What you can do is use a Format Date utility in your Zap and convert the initial date value to this formatting:

YYYY-MM-DD

Then map the utility>format date value to MySql action. If this doesn’t help then you can read the proper MySql date time formatting guide and format that date following this: https://zapier.com/help/create/format/modify-date-and-time-formats-in-zaps

Before I posted here I tried Fommatter tool, but it didn’t succeed. Maybe my usage is wrong...
 

Actually, I contacted Zapier support after I posted here, I got reply from them. 

They said, they already aware this issue and now on try to fix,

and at the moment, the workaround for this would be to change the 'Newdate' column type from DATE/DATETIME to TIMESTAMP in MySQL.

 

So following their reply I changed DATE type to TIMESTMP, then error had gone and my problem was solved.

 

I refer information you taught me to prevent other problem with date format etc. 

Thank you for your reply!
 

Reply