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

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: https://medium.com/@donaldlee50/golang-tutorial-extra-step-4-f6185d29928f

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: https://www.linkedin.com/in/donaldlee50
Instagram: https://www.instagram.com/donlee50/
Twitter: https://twitter.com/donaldlee50
Youtube: https://youtube.com/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!

Post Author: hatefull