Difference between date, datetime and datestamp fields

By xngo on February 21, 2019

The difference resides in the way each field is stored in the database.
date
The date field is an ISO 8601 standard date. It is useful if you want to store incomplete dates, like year and month only. It is stored in the database as varchar field.
datetime
It is use for complete dates. It is stored in regular datetime field of the database.
datestamp
datestamp is the unix timestamp. It is discouraged to use this in favor of datetime.

Reference:

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.