Golang Tutorial Extra Step #4 – Golang GORM – Incorrect datetime value

Опубликовано: 29 Октябрь 2024
на канале: CourseHack
529
2

Today's video will talk about Golang and GORM and this issue we get with "Incorrect datetime value".

The specific error is:
gorm Incorrect datetime value: '0000-00-00' for column 'created_at'

What you're trying to do is save a struct/model/object, but it can't save it because of this error.

Hope you had fun and learned something today!

Accompanying medium article:   / golang-tutorial-extra-step-4  

Don't forget to like, comment, and subscribe!!!

========================================================
Reference Links
========================================================
GORM: https://gorm.io/
Gorm Preloading: http://gorm.io/docs/preload.html
========================================================
Connect with me!
========================================================
Linkedin:   / donaldlee50  
Instagram:   / donlee50  
Twitter:   / donaldlee50  
Youtube:    / coursehack  
Mailing List: http://bit.ly/coursehack-mailing-list
Coursehack's Facebook Group: bit.ly/join-coursehack-facebook-group

Don't forget to like, comment, and subscribe!