| Point | DATETIME | TIMESTAMP |
|---|
| Range | 1000-01-01 to 9999-12-31 | 1970-01-01 to 2038-01-19 |
| Time zone | Stored as it is | Converted to UTC and back to the session time zone |
| Auto update | Possible with a default | Common for created_at and updated_at |
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
See MySQL Data Types and Date Functions.
Learn more about the similar topics:
| Tutorials |
| No Content Found. |
| Exercises & Assignments |
| No Content Found. |
| Interview Questions & Answers |
| No Content Found. |